From 1fd7129bc6b3792f2dc5ff08a77f167c7e628093 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 28 Nov 2011 04:55:48 +0100 Subject: [PATCH] vi: fix [end] key handling Signed-off-by: Denys Vlasenko --- editors/vi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); }