From 2b84984769a7dc45368fcb16e00e49890b7bfdc1 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 23 Apr 2008 08:43:38 +0000 Subject: 24865: bad character adjustment in vireplacechars() --- ChangeLog | 3 +++ Src/Zle/zle_vi.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index cea4a566e..51d3e0614 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-04-23 Peter Stephenson + * 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 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--) -- cgit 1.4.1