tvi: show the cursor even after failed motions - neatvi - [fork] simple vi-type editor with UTF-8 support
(HTM) git clone git://src.adamsgaard.dk/neatvi
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit b4b9f99e7ed6100016bcfc64b7e66e3d10e8ce70
(DIR) parent 259abea4a093f8b12def593c5851ebf7effa525f
(HTM) Author: Ali Gholami Rudi <ali@rudi.ir>
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(-)
---
(DIR) 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)