mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-05 23:11:11 +02:00
38229: fix cursor placement calculation when completing in empty double quotes
This commit is contained in:
parent
2b7035d974
commit
70fb93b64e
2 changed files with 13 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2016-04-03 Barton E. Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 38229: Src/Zle/zle_tricky.c: fix cursor placement calculation
|
||||
when completing in empty double quotes
|
||||
|
||||
2016-03-26 Barton E. Schaefer <schaefer@zsh.org>
|
||||
|
||||
* Dmitry Marakasov: 38162: accept G for gigabytes in limit command
|
||||
|
|
|
@ -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... */
|
||||
|
|
Loading…
Reference in a new issue