summaryrefslogtreecommitdiff
path: root/Src/Zle/zle_vi.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-04-20 16:57:21 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-04-20 16:57:21 +0000
commitdea42c692fecdd7e0e867f26f25cdc300dafbf2b (patch)
treed1f38590ec278e2401cd7262dec984fd5330aa40 /Src/Zle/zle_vi.c
parentb404fc3aeb7486f1423f54ae7a2914a0425adbac (diff)
downloadzsh-dea42c692fecdd7e0e867f26f25cdc300dafbf2b.tar.gz
zsh-dea42c692fecdd7e0e867f26f25cdc300dafbf2b.zip
24852: more combining chars fallout
Diffstat (limited to 'Src/Zle/zle_vi.c')
-rw-r--r--Src/Zle/zle_vi.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/Src/Zle/zle_vi.c b/Src/Zle/zle_vi.c
index c807da359..b8c3936d4 100644
--- a/Src/Zle/zle_vi.c
+++ b/Src/Zle/zle_vi.c
@@ -353,10 +353,14 @@ videletechar(char **args)
return 1;
/* Put argument into the acceptable range -- it is not an error to *
* specify a greater count than the number of available characters. */
- if (n > findeol() - zlecs)
+ /* HERE: we should do the test properly with INCPOS(). */
+ if (n > findeol() - zlecs) {
n = findeol() - zlecs;
- /* do the deletion */
- forekill(n, CUT_RAW);
+ /* do the deletion */
+ forekill(n, CUT_RAW);
+ } else {
+ forekill(n, 0);
+ }
return 0;
}
@@ -714,10 +718,13 @@ vibackwarddeletechar(char **args)
}
/* Put argument into the acceptable range -- it is not an error to *
* specify a greater count than the number of available characters. */
- if (n > zlecs - findbol())
+ /* HERE: we should do the test properly with DECPOS(). */
+ if (n > zlecs - findbol()) {
n = zlecs - findbol();
- /* do the deletion */
- backkill(n, CUT_FRONT|CUT_RAW);
+ /* do the deletion */
+ backkill(n, CUT_FRONT|CUT_RAW);
+ } else
+ backkill(n, CUT_FRONT);
return 0;
}