diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/zle_hist.c | 6 | ||||
-rw-r--r-- | Src/Zle/zle_misc.c | 2 | ||||
-rw-r--r-- | Src/Zle/zle_tricky.c | 5 |
3 files changed, 8 insertions, 5 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; } } diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c index fb8070e0a..fb03ee149 100644 --- a/Src/Zle/zle_misc.c +++ b/Src/Zle/zle_misc.c @@ -56,6 +56,8 @@ doinsert(ZLE_STRING_T zstr, int len) zleline[zlecs++] = *s; if(neg) zlecs += zmult * len; + /* if we ended up on a combining character, skip over it */ + CCRIGHT(); } /**/ diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c index 8223c7046..d7c17676b 100644 --- a/Src/Zle/zle_tricky.c +++ b/Src/Zle/zle_tricky.c @@ -980,14 +980,11 @@ unmetafy_line(void) free(zlemetaline); zlemetaline = NULL; - -#ifdef MULTIBYTE_SUPPORT /* * If we inserted combining characters under the cursor we * won't have tested the effect yet. So fix it up now. */ - alignmultiwordright(1); -#endif + CCRIGHT(); } /* Free a brinfo list. */ |