patch-ed.chared.c.patch - pkgsrc-localpatches - leot's pkgsrc LOCALPATCHES
(HTM) hg clone https://bitbucket.org/iamleot/pkgsrc-localpatches
(DIR) Log
(DIR) Files
(DIR) Refs
---
patch-ed.chared.c.patch
---
1 $NetBSD$
2
3 Add support for `vimoveback' in order to move the cursor back for
4 vi-cmd-mode (like vi(1), editline(3), etc.)
5
6 --- ed.chared.c.orig 2015-08-19 14:29:55.000000000 +0000
7 +++ ed.chared.c
8 @@ -1404,14 +1404,8 @@ v_cmd_mode(Char c)
9
10 inputmode = MODE_INSERT;
11 c_alternativ_key_map(1);
12 -#ifdef notdef
13 - /*
14 - * We don't want to move the cursor, because all the editing
15 - * commands don't include the character under the cursor.
16 - */
17 - if (Cursor > InputBuf)
18 + if (adrof(STRvimoveback) && Cursor > InputBuf)
19 Cursor--;
20 -#endif
21 RefCursor();
22 return(CC_NORM);
23 }