1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-11 10:41:12 +02:00
Commit graph

159 commits

Author SHA1 Message Date
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
Peter Stephenson
7e5a7a9135 28237: new parameter ZLE_LINE_ABORTED
28241: don't list .safe with bindkey -lL
2010-09-08 12:32:32 +00:00
Peter Stephenson
9a17762b0c users/15217: use top-level status when redrawing prompt 2010-07-31 19:36:53 +00:00
Wayne Davison
693fd5b56e Check the return value of all pipe(), read(), and write() calls.
Gets rid of all the remaining "ignoring return value" compiler
warnings, and makes some read/write operations safer by ensuring
that an EINTR is handled.
2009-12-16 18:39:06 +00:00
Peter Stephenson
af39a5ab1a 26463: Greg Klanderman: add zle-line-finish widget
26464: Greg Klanderman: fix insert-ids=single for menu completion
26465: Greg Klanderman: command keymap for execution
2009-01-28 09:31:53 +00:00
Peter Stephenson
02f05d7462 26110: option to allow vared to open to an alternative terminal 2008-12-09 17:37:01 +00:00
Oliver Kiddle
dcd26714bb 26030: fix memory leak in vared 2008-11-12 12:59:07 +00:00
Peter Stephenson
a1958f3c41 26025: prefer handling user input to zle -F file descriptor 2008-11-11 18:25:44 +00:00
Peter Stephenson
b2d08a2155 25744: dynamic named directories and further doshfunc() simplification 2008-09-26 09:11:27 +00:00
Peter Stephenson
9ae36771fe 25723: align combining character when popped from input stack 2008-09-22 18:37:49 +00:00
Peter Stephenson
2920c227d3 25677: add %x and %I prompt escapes for shell source code debugging
tidy up interface to doshfunc()
2008-09-16 15:02:01 +00:00
Clint Adams
c715630baa 25634: free t before returning if both t and errflag are set. 2008-09-08 06:24:16 +00:00
Peter Stephenson
0c9830d23c 25345, 25347: neaten interface from main shell to zle 2008-07-31 08:44:16 +00:00
Peter Stephenson
0409391c7d 25272: add zshaddhistory hook 2008-07-17 11:27:55 +00:00
Peter Stephenson
bd70d684fc 25002: only ZLE should update attributes resulting from prompt expansion 2008-05-12 13:50:42 +00:00
Peter Stephenson
fadf4a55ff 24899: make colour escape sequences configurable
allow ANSI colour names
2008-05-01 10:58:23 +00:00
Peter Stephenson
b8ec06c870 24853: use metafied strings for inner loops over history 2008-04-20 21:17:29 +00:00