summaryrefslogtreecommitdiff
path: root/Src/Zle/zle_hist.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-04-14 14:57:52 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-04-14 14:57:52 +0000
commitfe6d34f024a20d57741b500a91649fa7032cc509 (patch)
tree110b2ad2612ede550834b973a9287c454c604904 /Src/Zle/zle_hist.c
parent5eb7948f86c518a489be3f4150c6cf588fd58727 (diff)
downloadzsh-fe6d34f024a20d57741b500a91649fa7032cc509.tar.gz
zsh-fe6d34f024a20d57741b500a91649fa7032cc509.zip
24816: some places where we need cursor alignment with combining characters
Diffstat (limited to 'Src/Zle/zle_hist.c')
-rw-r--r--Src/Zle/zle_hist.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c
index ddd17b760..066750e23 100644
--- a/Src/Zle/zle_hist.c
+++ b/Src/Zle/zle_hist.c
@@ -756,10 +756,12 @@ zle_setline(Histent he)
ZS_memcpy(zleline, he->zle_text, zlell);
if ((zlecs = zlell) && invicmdmode())
- zlecs--;
+ DECCS();
} else {
setline(he->node.nam, ZSL_COPY|ZSL_TOEND);
}
+ /* Move right if we're on a zero-width combining character */
+ CCRIGHT();
setlastline();
clearlist = 1;
}
@@ -1548,6 +1550,7 @@ historybeginningsearchbackward(char **args)
zletextfree(&zt);
zle_setline(he);
zlecs = cpos;
+ CCRIGHT();
return 0;
}
}
@@ -1588,6 +1591,7 @@ historybeginningsearchforward(char **args)
zletextfree(&zt);
zle_setline(he);
zlecs = cpos;
+ CCRIGHT();
return 0;
}
}