The warning was:
.
warning: passing 'const char *' to parameter of type 'void *'
discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
This is useful when multiple plugins add region_highlight entries and
subsequently want to remove only their own entries. Without this
functionality, recognizing one's region_highlight entries is not trivial
because the 'start' and 'end' offsets are modified by editing of $BUFFER
and the highlight specification may not be unique or distinctive.
The tweaks are as follows:
- Change zfree() to zsfree() per workers/46070.
- Remove the mem.c hunk, as it changed the signature of only one out of
two alternative definitions of zsfree(). (The definition that hunk
touched is the one that's not used by default.)
Assignments after the first were not recognised as such as without
the full parser the state didn't return to command position.
Fix this in bufferwords() and the completion miniparser.
Indentatin in moveto was broken by 3eea35d0 (my bad), making it
difficult to read. This commit reverts it to what it used ot be.
While at it, fix indentation in a few other places in the same
file.
When TTY disappears and there is at least one fd watcher, raw_getbyte() can
enter an infinite loop where it keeps calling poll() over and over again.
To reproduce, open a terminal, start zsh and type this:
rm -f /tmp/fifo
mkfifo /tmp/fifo
exec 3<>/tmp/fifo
do-nothing() {}
zle -F 3 do-nothing
Then make TTY disappear. For example, kill the parent with `kill -9 $PPID`
and close the terminal window if it's still there. Observe that zsh is
consiming 100% CPU. Note that do-nothing() never gets called.
This patch makes the poll() loop in raw_getbyte() terminate when TTY is
signalling POLLHUP. This makes the behavior consistent with the case where
TTY disappears while no fd watchers are installed.
Pick number of leading or trailing path components to substitute.
Active in history, brace parameters, glob qualifiers.
Add tests for all three environments.
This causes problems with failed ZLE reads that printed a message
in the display area, in particular ignoreEOF warnings.
It appears it's not needed for the overall effect of the fixes in
zsh-workers/40302, commit 34656ec2.
For read -k and read -q where we use ZLE, we just want a single
key and not full ZLE processing. So don't handle timed
ZLE functions when preforming the read.