In trunk (1.20) There is a problem when we hit the "End" key This patch fix the lock in navigation mode, but there is another problem in Insert Mode (invalid char)
sorry, was already fixed :p *** This bug has been marked as a duplicate of bug 4153 ***
diff --git a/editors/vi.c b/editors/vi.c index 71d6008..8a28212 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -3069,9 +3069,8 @@ static void do_cmd(int c) int cnt, i, j; int c1; -// c1 = c; // quiet the compiler -// cnt = yf = 0; // quiet the compiler -// p = q = save_dot = buf; // quiet the compiler + c1 = cnt = 0; + p = q = save_dot = NULL; memset(buf, '\0', sizeof(buf)); show_status_line(); @@ -3317,12 +3316,19 @@ static void do_cmd(int c) #endif /* FEATURE_VI_YANKMARK */ case '$': // $- goto end of line case KEYCODE_END: // Cursor Key End + if (--cmdcnt > 0) { + dot_next(); + do_cmd(c); + } + dot = end_line(dot); +/* for (;;) { dot = end_line(dot); if (--cmdcnt > 0) break; dot_next(); } +*/ break; case '%': // %- find matching char of pair () [] {} for (q = dot; q < end && *q != '\n'; q++) {
The fix is simple: if (--cmdcnt > 0) condition should be reversed: f (--cmdcnt <= 0) Fixed in git.