1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-15 13:34:18 +01:00

33575: reset vi change start position if text is inserted

before it or on history movement
This commit is contained in:
Oliver Kiddle 2014-11-03 00:31:57 +01:00
parent 023c2236e1
commit 4d89ec25f1
3 changed files with 9 additions and 1 deletions

@ -1,3 +1,8 @@
2014-11-02 Oliver Kiddle <opk@zsh.org>
* 33575: Src/Zle/zle_params.c, Src/Zle/zle_utils.c: reset vi change
start position if text is inserted before it or on history movement
2014-11-02 Peter Stephenson <p.w.stephenson@ntlworld.com>
* 33591: Src/exec.c, Test/D04parameter.ztst: don't treat an exec

@ -198,7 +198,7 @@ set_buffer(UNUSED(Param pm), char *x)
setline(x, 0);
zsfree(x);
} else
zlecs = zlell = 0;
viinsbegin = zlecs = zlell = 0;
fixsuffix();
menucmp = 0;
}

@ -785,6 +785,8 @@ spaceinline(int ct)
if (mark > zlecs)
mark += ct;
if (viinsbegin > zlecs)
viinsbegin = 0;
if (region_highlights) {
for (rhp = region_highlights + N_SPECIAL_HIGHLIGHTS;
@ -1104,6 +1106,7 @@ setline(char *s, int flags)
*/
free(zleline);
viinsbegin = 0;
zleline = stringaszleline(scp, 0, &zlell, &linesz, NULL);
if ((flags & ZSL_TOEND) && (zlecs = zlell) && invicmdmode())