diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/zle_vi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/Zle/zle_vi.c b/Src/Zle/zle_vi.c index 16b741b75..d966a29ce 100644 --- a/Src/Zle/zle_vi.c +++ b/Src/Zle/zle_vi.c @@ -540,9 +540,11 @@ vireplacechars(UNUSED(char **args)) * Make sure we delete displayed characters, including * attach combining characters. n includes this as a raw * buffer offset. + * Use shiftchars so as not to adjust the cursor position; + * we are overwriting anything that remains directly. */ if (n > newchars) - foredel(n - newchars, CUT_RAW); + shiftchars(zlecs, n - newchars); else if (n < newchars) spaceinline(newchars - n); while (newchars--) |