mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-07-11 16:51:26 +02:00
42870: another improvement of 'compset -q'
zlemetall need not count the 'x' added at the cursor in set_comp_sep()
This commit is contained in:
parent
d5e8406729
commit
1a97dcbed1
2 changed files with 10 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2018-05-31 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
||||||
|
|
||||||
|
* 42870: Src/Zle/compcore.c: another improvement of 'compset -q'
|
||||||
|
|
||||||
2018-05-29 Peter Stephenson <p.stephenson@samsung.com>
|
2018-05-29 Peter Stephenson <p.stephenson@samsung.com>
|
||||||
|
|
||||||
* c.f. 42865: config.guess, config.sub: update from GNU
|
* c.f. 42865: config.guess, config.sub: update from GNU
|
||||||
|
|
|
@ -1610,9 +1610,11 @@ set_comp_sep(void)
|
||||||
inpush(dupstrspace(tmp), 0, NULL);
|
inpush(dupstrspace(tmp), 0, NULL);
|
||||||
zlemetaline = tmp;
|
zlemetaline = tmp;
|
||||||
/*
|
/*
|
||||||
* Length of temporary string, calculated above.
|
* tl is the length of temporary string, calculated above.
|
||||||
|
* It seems zlemetall need not include the 'x' added at the cursor.
|
||||||
|
* addedx is taken care of in function gotword() (lex.c).
|
||||||
*/
|
*/
|
||||||
zlemetall = tl;
|
zlemetall = tl - addedx;
|
||||||
strinbeg(0);
|
strinbeg(0);
|
||||||
noaliases = 1;
|
noaliases = 1;
|
||||||
do {
|
do {
|
||||||
|
@ -1668,8 +1670,8 @@ set_comp_sep(void)
|
||||||
DPUTS(!p, "no current word in substr");
|
DPUTS(!p, "no current word in substr");
|
||||||
got = 1;
|
got = 1;
|
||||||
cur = countlinknodes(foo) - 1; /* cur is 0 offset */
|
cur = countlinknodes(foo) - 1; /* cur is 0 offset */
|
||||||
swb = wb - 1 - dq - sq - dolq;
|
swb = wb - dq - sq - dolq;
|
||||||
swe = we - 1 - dq - sq - dolq;
|
swe = we - dq - sq - dolq;
|
||||||
sqq = lsq;
|
sqq = lsq;
|
||||||
soffs = zlemetacs - swb - css;
|
soffs = zlemetacs - swb - css;
|
||||||
DPUTS2(p[soffs] != 'x', "expecting 'x' at offset %d of \"%s\"",
|
DPUTS2(p[soffs] != 'x', "expecting 'x' at offset %d of \"%s\"",
|
||||||
|
|
Loading…
Reference in a new issue