summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/zle_vi.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index cea4a566e..51d3e0614 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2008-04-23 Peter Stephenson <pws@csr.com>
+ * 24865: Src/zle_vi.c: bad character adjustment in
+ vireplacechars().
+
* 24864: Jun T.: configure.ac, Src/zsh.h: typos in 24861.
2008-04-22 Peter Stephenson <pws@csr.com>
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--)