Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: bug in 3.1.4 completion

Bart Schaefer wrote:

> On Nov 4, 10:04am, Sven Wischnowsky wrote:
> } Subject: Re:  bug in 3.1.4 completion
> }
> } There was a missing fixsuffix() when inserting the unambiguous string
> } for normal completion.  [...]
> } 
> } Here is another missing call to fixsuffix() (fixed by the first
> } hunk). [...]
> There seem to be an awful lot of completion bugs related to missing or
> misplaced calls to fixsuffix().  Those bugs weren't present in 3.0.5.
> I was was not paying much attention to 3.1 until just before 3.1.4 (too
> busy with "real life") so I sort of glossed over all the changes that
> turned zle into a module, etc.  Was whatever reorganization required
> the addition of fixsuffix() really a good idea?  It doesn't -seem- like
> something that should need to be done in so many different places ...

It isn't that bad, three calls in zle_misc.c and three in
zle_tricky.c. I just had some trouble inserting it in all the places
where the completion code changes the line (the one in
delete-char-or-list was something special since there I had to insert
it in the if-branch that *didn't* call the completion code, it should
have been there from the beginning).

We could try to replace the calls we have now by calls in those
functions that actually alter the command line (shiftline(),
inststrlen(), and the like). This probably doesn't reduce the number
of calls but it may ensure that there aren't any places where these
functions are called and fixsuffix() is not called. But since I didn't 
write the fixsuffix() code I'd rather not fiddle with it.


Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx

Messages sorted by: Reverse Date, Date, Thread, Author