tvi: show the cursor even after failed motions - neatvi - [fork] simple vi-type editor with UTF-8 support | |
git clone git://src.adamsgaard.dk/neatvi | |
Log | |
Files | |
Refs | |
README | |
--- | |
commit b4b9f99e7ed6100016bcfc64b7e66e3d10e8ce70 | |
parent 259abea4a093f8b12def593c5851ebf7effa525f | |
Author: Ali Gholami Rudi | |
Date: Fri, 15 May 2015 00:31:02 +0430 vi: show the cursor even after failed motions Diffstat: M vi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- | |
diff --git a/vi.c b/vi.c | |
t@@ -859,9 +859,7 @@ static void vi(void) if ((pre1 = vi_prefix()) < 0) continue; mv = vi_motion(&xrow, &xcol, pre1, 0); - if (mv < 0) - continue; - if (mv) { + if (mv > 0) { if (strchr("\'GHML/?", mv)) lbuf_mark(xb, '\'', orow); if (xcol < 0) { t@@ -870,7 +868,7 @@ static void vi(void) else lbuf_postindents(xb, &xrow, &xcol); } - } else { + } else if (mv == 0) { int c = vi_read(); int z; if (c <= 0) |