vi: fix [end] key handling

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2011-11-28 04:55:48 +01:00
parent 65a1ee956f
commit 1fd7129bc6

View File

@ -3319,7 +3319,7 @@ static void do_cmd(int c)
case KEYCODE_END: // Cursor Key End case KEYCODE_END: // Cursor Key End
for (;;) { for (;;) {
dot = end_line(dot); dot = end_line(dot);
if (--cmdcnt > 0) if (--cmdcnt <= 0)
break; break;
dot_next(); dot_next();
} }