summaryrefslogtreecommitdiff
path: root/Src/Zle/zle_main.c
AgeCommit message (Collapse)AuthorFilesLines
2023-07-2651950 (tweak per 51949): correct Thingy refcount in raw_getbyte()Bart Schaefer1-1/+2
2023-02-0951320, 51383: fixes to prevent later reappearance of old attributesOliver Kiddle1-1/+1
Also associated test updates and a test fix for TERM=dumb.
2023-01-2151310: zle -F handlers preserve LASTWIDGETBart Schaefer1-0/+2
Also fix email address in an old ChangeLog entry
2023-01-1051281: keep track of attributes left on at the end of left and right prompts ↵Oliver Kiddle1-1/+6
and reapply them explicitly as appropriate
2023-01-1051258, 51272: refactor handling of terminal attributes, removing OFF flags ↵Oliver Kiddle1-9/+10
in zattr
2022-12-1651212: remove STOUC() macroOliver Kiddle1-2/+2
This served as a workaround for ancient compilers where casts to unsigned char were broken.
2021-05-15users/26736: avoid infinite loop in getbyte from exit hookBart Schaefer1-0/+4
2021-01-2747744: Fix vi repeats with hooks in use.GammaFunction1-0/+2
2020-02-2445487: Missing mod_export declarations for AIXPeter Stephenson1-1/+1
2020-01-0945269: Fix misspellings in completions and elsewhere.Jens Schleusener1-1/+1
2019-12-1745058: internal: Add symbolic names to possible values of zexit()'s ↵Daniel Shahaf1-2/+2
"from_where" parameter. No functional change.
2019-12-0444976: fixup describe-key-briefly for visual modeOliver Kiddle1-0/+4
2019-10-04bug fix: infinite loop when tty disappearsromkatv1-1/+1
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.
2019-04-1044168 (tweaked to remove change to errflag): Fix interrupt handling of zle -F.Peter Stephenson1-1/+5
If interrupted by irrelevant interrupt (EINTR only is set), don't set the local error flag, just retry.
2019-04-1044215: Maintain LASTWIDGET across reset-prompt.Roman Perepelitsa1-5/+11
This avoids side effects of asynchronous notifications.
2019-02-14c.f. 44062: Back off clearflag change to ZLE line init.Peter Stephenson1-1/+0
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.
2018-09-03Don't handle ZLE functions for single key.Peter Stephenson1-11/+11
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.
2018-08-1743294: Add ZLE_RECURSIVE parameter.Peter Stephenson1-0/+9
2018-07-3043225: Recalculate ZLE timeout.Peter Stephenson1-0/+2
Needed when looping owing to having handled a special fd.
2018-06-2543084: Variable warning suppression enhancements.Peter Stephenson1-3/+5
Add vared -g option along the lines of typeset -g. Set reply safely in zsh_directory_name_cdr.
2018-05-0842751: Protect shell status in ZLE timed function handler.Peter Stephenson1-0/+4
Otherwise status from sched and other asynchronous functions could escape back to the main shell.
2017-06-1341275: Leave stdin open when executing widgetsStephane Chazelas1-0/+7
2017-01-1040305: fix some problems redisplaying command line after interrupt.Peter Stephenson1-0/+1
Back off previous fix as this only covered some subset of problems. Remaining problems happend after reset-prompt in TRAPINT. One was in complist and is fixed by not attempting to list after an error or interrupt. The other was owing to not resetting clearflag when ZLE was re-entered.
2016-11-23unposted: clear ERRFLAG_ERROR before invoking immortal widget (cf. 39934)Bart Schaefer1-1/+5
Updates commit cbb9ca3d
2016-11-2039986, 39989: improve handling of vi-repeat-changeOliver Kiddle1-5/+29
Save previous vi change and throw away a new change that fails. Add zle -f vichange to allow shell widget to be a single change. Fix repeat of command where numeric arguments were multiplied.
2016-11-1339934: if a widget execution fails, try to execute a corresponding immortal ↵Barton E. Schaefer1-3/+15
widget instead.
2016-11-1339933: more of zlecallhook() in redrawhook()Barton E. Schaefer1-2/+17
add commentary on some of the differences
2016-10-0339550: reset signal queue in recursiveedit()Barton E. Schaefer1-0/+6
2016-10-0339547: handle zero delta in calc_timeout()Barton E. Schaefer1-1/+1
2016-10-0339545: Add some missing unqueue_signals().Peter Stephenson1-0/+1
All of these are added simply to fit existing logic in other branches.
2016-09-30Call the pre-redraw hook if there is text in the buffer on initMikael Magnusson1-1/+13
2016-07-2838927: zle-line-pre-redraw: Set $WIDGET like other special widgets do.Daniel Shahaf1-1/+1
2016-07-1738845: reset region_active before entering zleOliver Kiddle1-1/+1
It was done on exit but before zle-line-finish. Also reword documentation on region to better cover vi mode.
2016-04-0438241: ungetkeycmd() needs to unmetafy key string.Peter Stephenson1-0/+15
Use the new function to simplify memory management in prefix handling. Third time lucky.
2016-03-2138191: additional re-entrancy checks in reexpandprompt()Barton E. Schaefer1-8/+27
Do not free global pointers until after promptexpand() in case they are referenced from signal handlers, and check for window size changes during promptexpand().
2016-01-1437590: Invoke zle-line-pre-redraw during isearch.Daniel Shahaf1-1/+2
2015-12-1936650: Add zle-line-pre-redraw hook for highlightingMikael Magnusson1-1/+30
2015-12-0737337: Delay freeing widget until not in use.Peter Stephenson1-2/+19
2015-11-2237186: a couple more WARN_CREATE_GLOBAL fixesPeter Stephenson1-1/+2
2015-10-0136709: zle -f from inside widget to set flags and make yank start/end zle ↵Mikael Magnusson1-2/+3
params writable
2015-09-11Read full multibyte string early for self-insertPeter Stephenson1-2/+8
2015-09-1036470: Auxiliary to 36468, return an empty buffer from zleread() if a widget ↵Barton E. Schaefer1-1/+1
exits
2015-07-2335814: POSTEDIT needs to be unmetafiedOliver Kiddle1-1/+1
2015-07-0335674: make an undo event for initial buffer contentsOliver Kiddle1-0/+1
2015-06-2935637: remove the now unused module hook for reverse-menu-completeOliver Kiddle1-2/+0
2015-06-1935474, 35492: support the bracketed paste mode of newer terminal emulatorsOliver Kiddle1-1/+14
2015-03-0634653: move aborted vared lines to ZLE_VARED_ABORTEDPeter Stephenson1-1/+3
2014-12-1133876: etc.: Separate errors and keyboards interruptsPeter Stephenson1-5/+9
Combination of 12 commits from interrupt_abort branch. Basic strategy is to introduce bits to errflag and to set and reset them separately. Remove interrupt status on return to main keymap. Turn off ERRFLAG_INT for always block. Restore bit thereafter: we probably need a new variable in order to allow user interrupts to be reset in the always block. Add TRY_BLOCK_INTERRUPT This works the same as TRY_BLOCK_ERROR, but for a SIGINT, too. Ensure propagation of SIGINT from exited job. If received by foreground job, shell uses ERRFLAG_INT, not ERRFLAG_ERROR, to set the new state. Reset errflag before precmd() Add always block in _main_completion to fix ZLS_COLORS Ensures we get the right state of $ZLS_COLORS at the end of _main_complete even if there's an interrupt. However, the "right state" is a bit messy as it depends on styles.
2014-11-3033800: remove old workaround for ancient systems toOliver Kiddle1-41/+2
consume typeahead before setting up the terminal
2014-11-2533770: avoid calling identical FIONREAD ioctl twice in successionOliver Kiddle1-9/+5