diff options
author | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2018-05-31 21:07:53 +0900 |
---|---|---|
committer | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2018-05-31 21:07:53 +0900 |
commit | 1a97dcbed1bf0b8f5225819096670df6a40e9844 (patch) | |
tree | 71ac5a0f8e6f788cf2a08bfbd457e9add93f4cb7 /Src/Zle | |
parent | d5e840672983f90598c377035d10fe4fae52f5d4 (diff) | |
download | zsh-1a97dcbed1bf0b8f5225819096670df6a40e9844.tar.gz zsh-1a97dcbed1bf0b8f5225819096670df6a40e9844.tar.xz zsh-1a97dcbed1bf0b8f5225819096670df6a40e9844.zip |
42870: another improvement of 'compset -q'
zlemetall need not count the 'x' added at the cursor in set_comp_sep()
Diffstat (limited to 'Src/Zle')
-rw-r--r-- | Src/Zle/compcore.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index f733e0ee5..fd415da89 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -1610,9 +1610,11 @@ set_comp_sep(void) inpush(dupstrspace(tmp), 0, NULL); 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); noaliases = 1; do { @@ -1668,8 +1670,8 @@ set_comp_sep(void) DPUTS(!p, "no current word in substr"); got = 1; cur = countlinknodes(foo) - 1; /* cur is 0 offset */ - swb = wb - 1 - dq - sq - dolq; - swe = we - 1 - dq - sq - dolq; + swb = wb - dq - sq - dolq; + swe = we - dq - sq - dolq; sqq = lsq; soffs = zlemetacs - swb - css; DPUTS2(p[soffs] != 'x', "expecting 'x' at offset %d of \"%s\"", |