# HG changeset patch # User Mikael Berthe # Date 1270318897 -7200 # Node ID 2b013c0f949ae40bfc5d6c9dbc191ec438bbb588 # Parent cca19ce862efe45c922a082064f293b14ff80ebf readline: Make backward_kill_iline() consistent with backward_kill_word() That is, stop on first character if it is the command character. diff -r cca19ce862ef -r 2b013c0f949a mcabber/mcabber/screen.c --- a/mcabber/mcabber/screen.c Sat Apr 03 20:10:22 2010 +0200 +++ b/mcabber/mcabber/screen.c Sat Apr 03 20:21:37 2010 +0200 @@ -3479,8 +3479,15 @@ void readline_backward_kill_iline(void) { - strcpy(inputLine, ptr_inputline); - ptr_inputline = inputLine; + char *dest = inputLine; + + if (ptr_inputline == inputLine) return; + + if (*dest == COMMAND_CHAR && ptr_inputline != dest+1) + dest = next_char(dest); + + strcpy(dest, ptr_inputline); + ptr_inputline = dest; inputline_offset = 0; }