Peter Stephenson
34656ec2f0
40305: fix some problems redisplaying command line after interrupt.
...
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.
2017-01-10 19:18:52 +00:00
Bart Schaefer
c0f95d07e7
unposted: clear ERRFLAG_ERROR before invoking immortal widget (cf. 39934)
...
Updates commit cbb9ca3d
2016-11-23 18:15:17 -08:00
Oliver Kiddle
cb5f100bd3
39986, 39989: improve handling of vi-repeat-change
...
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-20 23:59:48 +01:00
Barton E. Schaefer
cbb9ca3dfb
39934: if a widget execution fails, try to execute a corresponding immortal widget instead.
2016-11-13 15:52:09 -08:00
Barton E. Schaefer
7b8f638713
39933: more of zlecallhook() in redrawhook()
...
add commentary on some of the differences
2016-11-13 11:04:25 -08:00
Barton E. Schaefer
ccc0b6f8a6
39550: reset signal queue in recursiveedit()
2016-10-03 09:40:39 -07:00
Barton E. Schaefer
b71abea40f
39547: handle zero delta in calc_timeout()
2016-10-03 09:35:14 -07:00
Peter Stephenson
4ab3fcc90d
39545: Add some missing unqueue_signals().
...
All of these are added simply to fit existing logic in other branches.
2016-10-03 13:43:20 +01:00
Mikael Magnusson
5cf2ffb327
Call the pre-redraw hook if there is text in the buffer on init
2016-09-30 10:48:20 +02:00
Daniel Shahaf
8d7b9d013d
38927: zle-line-pre-redraw: Set $WIDGET like other special widgets do.
2016-07-28 18:12:19 +00:00
Oliver Kiddle
c32bb6a11c
38845: reset region_active before entering zle
...
It was done on exit but before zle-line-finish.
Also reword documentation on region to better cover vi mode.
2016-07-17 12:09:24 +02:00
Peter Stephenson
2b7035d974
38241: ungetkeycmd() needs to unmetafy key string.
...
Use the new function to simplify memory management in prefix handling.
Third time lucky.
2016-04-04 14:54:54 +01:00
Barton E. Schaefer
21202e7b95
38191: additional re-entrancy checks in reexpandprompt()
...
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-03-21 15:46:59 -07:00
Daniel Shahaf
5cf6ae0056
37590: Invoke zle-line-pre-redraw during isearch.
2016-01-14 00:04:12 +00:00
Mikael Magnusson
c3ea3ffa73
36650: Add zle-line-pre-redraw hook for highlighting
2015-12-19 13:21:12 +01:00
Peter Stephenson
0c2d823a79
37337: Delay freeing widget until not in use.
2015-12-07 14:32:52 +00:00
Peter Stephenson
ae4cf7b743
37186: a couple more WARN_CREATE_GLOBAL fixes
2015-11-22 16:06:20 +00:00
Mikael Magnusson
a855d7bd24
36709: zle -f from inside widget to set flags and make yank start/end zle params writable
2015-10-01 03:51:44 +02:00
Peter Stephenson
e1c0a947cc
Read full multibyte string early for self-insert
2015-09-11 21:40:45 +01:00
Barton E. Schaefer
3bca11c35c
36470: Auxiliary to 36468, return an empty buffer from zleread() if a widget exits
2015-09-10 09:10:08 -07:00
Oliver Kiddle
aee8aebd67
35814: POSTEDIT needs to be unmetafied
2015-07-23 05:22:46 +02:00
Oliver Kiddle
acb05d1616
35674: make an undo event for initial buffer contents
2015-07-03 22:56:03 +02:00
Oliver Kiddle
6e57de8ee2
35637: remove the now unused module hook for reverse-menu-complete
2015-06-29 01:59:43 +02:00
Oliver Kiddle
98687fa1de
35474, 35492: support the bracketed paste mode of newer terminal emulators
2015-06-19 00:15:38 +02:00
Peter Stephenson
2f3547689c
34653: move aborted vared lines to ZLE_VARED_ABORTED
2015-03-06 09:51:16 +00:00
Peter Stephenson
d067ebcacd
33876: etc.: Separate errors and keyboards interrupts
...
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-12-11 09:41:17 +00:00
Oliver Kiddle
40c5e00de0
33800: remove old workaround for ancient systems to
...
consume typeahead before setting up the terminal
2014-11-30 23:29:25 +01:00
Oliver Kiddle
feda07c641
33770: avoid calling identical FIONREAD ioctl twice in succession
2014-11-25 22:14:50 +01:00
Oliver Kiddle
15fc2cd4f0
33632: use viopp and visual local keymaps if they exist
2014-11-17 00:49:31 +01:00
Oliver Kiddle
a39c3adece
33512: add support for "0 vi buffer and yank to it
2014-10-23 17:00:31 +02:00
Barton E. Schaefer
7e04c1a53d
32427: avoid busy loop on closed descriptors for "zle -F" handlers
...
Also assure the handlers are called on error conditions and document the
extra argument that is passed in the error case.
2014-02-23 18:14:12 -08:00
Oliver Kiddle
e1bc9d0a44
32342: fix overstrike for vi mode and use varying vi commands at line start
2014-02-05 21:55:18 +01:00
Oliver Kiddle
2cd3b9ab74
32334 (modified so KEEPSUFFIX is unchanged for vi-cmd-mode; based on
...
Jun T: 32324, 32330), 32347, Jun T: 32344, 32349:
add split-undo zle widget for configurable breaks in undo sequence
2014-02-05 21:45:19 +01:00
Oliver Kiddle
a8c4ed64ee
32314: merge undo events corresponding to vi change in the vi-cmd-mode widget so undo from insert mode is useful again
2014-01-31 14:03:47 +01:00
Peter Stephenson
c56f5aed59
32308: Improve initialising of vi change.
...
Better handling when entering viins on entry to editor.
Slightly changed since post to use vi command a.
2014-01-28 16:12:41 +00:00
Peter Stephenson
2fc2bb7c17
31961: rationalise fd watching to use structure
2013-11-12 20:41:06 +00:00
Peter Stephenson
f77a7a5b18
31937: zle -Fw uses widget semantics for file descriptor handler
2013-11-07 15:19:07 +00:00
Peter Stephenson
0ed3c5ccd0
31765: If zle starts in viins mark as insertion.
...
This allows undo to work on everything entered.
2013-09-25 18:42:59 +01:00
Peter Stephenson
0b185e3dcd
users/17908: Keep history line in sync between ZLE and shell.
...
Update ZLE version if history is read, pushed or popped with ZLE active
2013-08-08 19:48:11 +01:00
Mikael Magnusson
d904e85904
31483: Call zrefresh() before unqueue()ing signals
...
Not doing so causes problems for example with this .zshrc
zle -N zle-line-init foo
zle -N set-local-history bar
foo() { zle set-local-history -n 1 }
bar() { zle reset-prompt }
2013-06-27 13:02:23 +02:00
Bart Schaefer
d19e18c68d
31350: block SIGWINCH nearly all the time, except
...
when about to calculate prompts or do synchronous read, so
syscalls are not interrupted by window size changes.
2013-04-30 00:08:49 -07:00
Frank Terbeck
daf4f19c3f
31172: Let vared define custom init and finish hooks
...
Using this, you can do things like this in a more straight-forward
manner:
foo-init() { CURSOR=0; }
zle -N foo-init
foo=$'Some longer\nbuffer with\nmultiple lines.'
vared -i foo-init foo
2013-04-05 17:23:45 +02:00
Frank Terbeck
6654b87b45
31174: zle: Make sure state changes are refreshed after init hook
...
If `zrefresh' is not called _after_ the zle-line-init hook, any changes
made to the editor's state (be it changes to $CURSOR or $BUFFER or
called widgets like `clear-screen') will only be picked up after the
first character is typed into the editor.
2013-04-05 17:23:45 +02:00
Peter Stephenson
9b923cccea
30084: `zle -T tc func' for zle testing of termcap output
2012-01-05 20:01:24 +00:00
Bart Schaefer
bcd0fd1128
queue_signals() to prevent adjustwinsize() loop on FreeBSD
2012-01-02 19:31:16 +00:00
Peter Stephenson
a3ae9f5d12
29643: set incompfunc to zero when executing hook or trap function
2011-08-04 08:30:50 +00:00
Peter Stephenson
a05a51ce8a
29542: fix crash in hbegin(), remove bad test
...
29543: fix backslash-newline within words with histlexwords
2011-07-12 08:37:11 +00:00
Peter Stephenson
54acd80359
29374: exit ZLE immediately if exit pending when keypress expected
2011-05-26 09:19:11 +00:00
Peter Stephenson
a7bc22ca00
Paul 28538 / me 28540 / couple of unposted casts:
...
use char * for pointer arithmetic rather than void *
2010-12-20 10:28:43 +00:00
Peter Stephenson
8856dc878e
28282: new function zlecallhook()
...
fix arguments to zle-keymap-select
2010-09-20 09:27:46 +00:00