Ticket #3390: mc-3390-backward-word-off-by-1.patch
File mc-3390-backward-word-off-by-1.patch, 484 bytes (added by egmont, 9 years ago) |
---|
-
lib/widget/input.c
diff --git a/lib/widget/input.c b/lib/widget/input.c index 4ce2ddb..c8d7b74 100644
a b backward_word (WInput * in) 425 425 const char *p, *p_tmp; 426 426 427 427 for (p = in->buffer + str_offset_to_pos (in->buffer, in->point); 428 (p != in->buffer) && (p[ 0] == '\0'); str_cprev_char (&p), in->point--);428 (p != in->buffer) && (p[-1] == '\0'); str_cprev_char (&p), in->point--); 429 429 430 430 while (p != in->buffer) 431 431 {