zsh-workers
 help / color / mirror / code / Atom feed
* bashcompinit incorrectly calculates COMP_LINE (proposed fix included)
@ 2017-11-17  9:19 Evan Underscore
  2017-11-19 19:49 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Evan Underscore @ 2017-11-17  9:19 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 962 bytes --]

Hi all,

A user discovered a bug in bashcompinit that causes COMP_LINE to be
incorrectly calculated. A summary of the incorrect behaviour is here:
https://github.com/kislyuk/argcomplete/issues/228#issuecomment-327696251
(Note some of the surrounding discussion is incorrect - this bug is
unrelated to unicode.) The table at the bottom of this comment summarises
how bashcompinit differs in its calculation of COMP_POINT.

The change that caused the bug appears to have been introduced here:
https://github.com/zsh-users/zsh/commit/23907bb840c80eef99eabba17e086e44c9b2d3fc#diff-b8d49b00032bcbfcdc709649f5d68505R11

Reverting this line (i.e. using CURRENT-1 instead of CURRENT, as it was
before this commit) fixes the bug for me, causing zsh to report 18 and 19
for the two test lines respectively, matching Bash.

I am not a subscriber; please send responses to this email address. I wish
to note the resolution of this on the argcomplete ticket.

Thanks,

Evan.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-19 22:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-17  9:19 bashcompinit incorrectly calculates COMP_LINE (proposed fix included) Evan Underscore
2017-11-19 19:49 ` Peter Stephenson
2017-11-19 22:55   ` Evan Underscore

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).