From daa5f39fdcbc35d11e17b02689b983e6b8851a92 Mon Sep 17 00:00:00 2001 From: Lisa Milne Date: Fri, 8 Dec 2023 08:19:22 +1000 Subject: [PATCH] make vi a command place the cursor correctly --- clite/vi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clite/vi.js b/clite/vi.js index 02c5bcd..2d06c2b 100644 --- a/clite/vi.js +++ b/clite/vi.js @@ -299,7 +299,7 @@ Options: showAt(topLine); break; case 'a': - cursor_col = lines[cursor_line].length; + cursor_col = lines[cursor_line][0].length; curses.noecho(); mode = 2; message = 'INSERT';