diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/zle_tricky.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c index a89b2a376..b1709c117 100644 --- a/Src/Zle/zle_tricky.c +++ b/Src/Zle/zle_tricky.c @@ -1849,8 +1849,12 @@ get_comp_string(void) ocs = zlemetacs; zlemetacs = i; foredel(skipchars, CUT_RAW); - if ((zlemetacs = ocs) > --i) + if ((zlemetacs = ocs) > --i) { zlemetacs -= skipchars; + /* do not skip past the beginning of the word */ + if (wb > zlemetacs) + zlemetacs = wb; + } we -= skipchars; } } else { @@ -1861,6 +1865,9 @@ get_comp_string(void) zlemetacs = we - skipchars; else zlemetacs = ocs; + /* do not skip past the beginning of the word */ + if (wb > zlemetacs) + zlemetacs = wb; we -= skipchars; } /* we need to get rid of all the quotation bits... */ |