Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/screen.c @ 1863:2b013c0f949a
readline: Make backward_kill_iline() consistent with backward_kill_word()
That is, stop on first character if it is the command character.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 03 Apr 2010 20:21:37 +0200 |
parents | 60db836ad98a |
children | 75a0a22bbf78 |
comparison
equal
deleted
inserted
replaced
1862:cca19ce862ef | 1863:2b013c0f949a |
---|---|
3477 check_offset(1); | 3477 check_offset(1); |
3478 } | 3478 } |
3479 | 3479 |
3480 void readline_backward_kill_iline(void) | 3480 void readline_backward_kill_iline(void) |
3481 { | 3481 { |
3482 strcpy(inputLine, ptr_inputline); | 3482 char *dest = inputLine; |
3483 ptr_inputline = inputLine; | 3483 |
3484 if (ptr_inputline == inputLine) return; | |
3485 | |
3486 if (*dest == COMMAND_CHAR && ptr_inputline != dest+1) | |
3487 dest = next_char(dest); | |
3488 | |
3489 strcpy(dest, ptr_inputline); | |
3490 ptr_inputline = dest; | |
3484 inputline_offset = 0; | 3491 inputline_offset = 0; |
3485 } | 3492 } |
3486 | 3493 |
3487 void readline_forward_kill_iline(void) | 3494 void readline_forward_kill_iline(void) |
3488 { | 3495 { |