From: Denys Vlasenko Date: Mon, 28 Nov 2011 03:55:48 +0000 (+0100) Subject: vi: fix [end] key handling X-Git-Tag: 1_20_0~139 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1fd7129bc6b3792f2dc5ff08a77f167c7e628093;p=oweals%2Fbusybox.git vi: fix [end] key handling Signed-off-by: Denys Vlasenko --- diff --git a/editors/vi.c b/editors/vi.c index 71d600834..6070c48d2 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -3319,7 +3319,7 @@ static void do_cmd(int c) case KEYCODE_END: // Cursor Key End for (;;) { dot = end_line(dot); - if (--cmdcnt > 0) + if (--cmdcnt <= 0) break; dot_next(); }