1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-28 17:10:59 +01:00
Commit graph

961 commits

Author SHA1 Message Date
Oliver Kiddle
98687fa1de 35474, 35492: support the bracketed paste mode of newer terminal emulators 2015-06-19 00:15:38 +02:00
Oliver Kiddle
0a0ba5e664 35487, 35496: don't reinstate previous incremental search string
when search direction changes
2015-06-19 00:01:42 +02:00
Peter Stephenson
f1923bdfa6 Add non-metafied character length handling.
Use this in regex module and add test using $'\ua0'.

Rename mb_metacharinit() to mb_charinit() as it does not involve
metafied characters.
2015-06-12 09:30:39 +01:00
Daniel Shahaf
9fcc105ff6 35127#1: Fix _describe/compdescribe problem with unsorted groups 2015-05-23 10:05:06 +00:00
Oliver Kiddle
08fb0f6602 35092: fix for numeric arguments from vi operator pending mode 2015-05-13 23:07:09 +02:00
Oliver Kiddle
9afbe051b9 35029: improvements to newline handling for vi-mode word movement 2015-05-04 21:51:06 +02:00
Peter Stephenson
de22f2bfa6 34919: update interrupt parse error for ZLE cases.
Covers both send-break and push-input.
2015-04-17 17:37:26 +01:00
Peter Stephenson
4508d25710 34905: no parse error after keyboard interrupt.
Handled generally, though only showing up in special nested
cases.

Also fix ZLE so it doesn't cancel the interrupt flag when
not actually returning from a local keymap.
2015-04-17 10:23:58 +01:00
Peter Stephenson
2f3547689c 34653: move aborted vared lines to ZLE_VARED_ABORTED 2015-03-06 09:51:16 +00:00
Peter Stephenson
c6c9f5daf2 34322: bug with interface to parsestr() etc.
Was showing up in places like ${(e)...} where command substitution
could reallocate the token string, but actually there was never any
guarantee that the lexer wouldn't do that, so this was always
a bit iffy.
2015-01-18 22:38:57 +00:00
Peter Stephenson
cfd91eac07 Rearrange context saving.
Variables are now associated with the module that declares them, being
initialised and saved/restored there.  However, as many variables are
used for communication between modules, many of them are set in multiple
places, so the assignment is ambiguous.
2015-01-09 21:33:39 +00:00
Jun-ichi Takimoto
152b797596 34144: allocate origline by ztrdup(), not by dupstring()
If origline is allocated in heap, it will have been freed
when menuselect() is called directly as a widget.
2015-01-07 21:48:28 +09:00
Mikael Magnusson
38dc59907b 34120: compctl, jobs: Check contents instead of array
text is an array in the struct, and can never be null.

Found by Coverity (Issue 1255780).
2015-01-06 23:51:01 +01:00
Mikael Magnusson
8035794a56 34119: complist: Fix leak of string in clnicezputs
Found by Coverity (Issue 1255808).
2015-01-06 23:47:05 +01:00
Mikael Magnusson
9e5dc2925c 34121: compresult: Remove unneeded NULL check
The variable is set to  if NULL at the start of the function, and derefed
on the previous line. Found by Coverity (Issue 1255843).
2015-01-06 23:46:49 +01:00
Mikael Magnusson
ea6bb993e9 34104: compctl: Remove pointless check
cc has already been derefed a bunch of times leading up to here. Found
by Coverity (Issue 1255841).
2015-01-06 23:46:31 +01:00
Mikael Magnusson
221ecf5010 34115: compcore: Fix size argument to zfree
Found by Coverity (Issue 1255852), has no impact unless using
--enable-zsh-mem, and even then it is minimal.
2015-01-06 23:46:18 +01:00
Mikael Magnusson
18b60d8512 34117: zle: size_t is unsigned, use int instead
The function wctomb returns an int according to my manpage, and we
furthermore check if it is negative, and then return it, and the function
signature is int, so declaring it as an int seems to make more sense.
2015-01-06 23:46:06 +01:00
Mikael Magnusson
c935381479 34116: computil: Check for NULL before passing to strlen
The rest of this function appears to be very careful about checking these,
then forgets in this one spot. Found by Coverity (Issue 1255805).
2015-01-06 23:45:51 +01:00
Daniel Shahaf
e11ad500dd 34070: fix starting position for memset() from 34005. 2014-12-28 20:11:09 -08:00
Peter Stephenson
fd934e1187 34005: region_highlights memory fix
Zero uninitialised part of memory when reallocing
2014-12-19 21:55:31 +00:00
Barton E. Schaefer
95381783e9 34002: zshcalloc() in init_keymaps() 2014-12-18 18:58:25 -08:00
Peter Stephenson
04e555a92e 33981: more care with region_highlights management 2014-12-18 18:54:55 +00:00
Jun-ichi Takimoto
fe51f39dad 33978: avoid infinite loop in interactive mode
Update command line when accept-and-hold is called in the
interactive mode of menu select.
2014-12-18 03:49:51 +09:00
Oliver Kiddle
1e0064e58b 33956: document key binding changes and remove ^X binding 2014-12-13 19:34:24 +01:00
Oliver Kiddle
5b7950e6ef 33846: additional default vi-mode key bindings 2014-12-13 19:32:55 +01:00
Oliver Kiddle
edb9c94025 33950: ignore KEYTIMEOUT for vi operators 2014-12-12 14:14:00 +01: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
88f4e24d4c 33924: allow vi line/characterwise mode to be forced 2014-12-08 17:24:48 +01:00
Oliver Kiddle
7a4a309973 33860: minor fixes to vi mode changes 2014-12-05 20:13:33 +01:00
Oliver Kiddle
b0a659e710 33845: save correct cursor position with push-line from vi command mode 2014-12-05 20:13:32 +01:00
Oliver Kiddle
d2505f108e 33823: overwrite mode shouldn't replace newlines 2014-11-30 23:37:01 +01: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
0d4b548d1e 33818: fix types passed to sizeof detected by coverity as being wrong 2014-11-30 23:19:55 +01:00
Marc Finet
2598010adf 33815: Fix word transposition bug.
With a one-character word the wrong two words could be transposed.
2014-11-28 09:40:24 +00:00
Oliver Kiddle
feda07c641 33770: avoid calling identical FIONREAD ioctl twice in succession 2014-11-25 22:14:50 +01:00
Oliver Kiddle
69594a6cf0 33738: account for a selection in vi-replace-chars 2014-11-21 11:40:01 +01:00
Oliver Kiddle
58da0f495c 33730: vim style text objects for selecting words 2014-11-21 11:40:00 +01:00
Oliver Kiddle
0a4223d908 unposted: reindent large block 2014-11-17 23:03:10 +01:00
Oliver Kiddle
d29e02c1a3 33704: keybindings, documentation, tests and minor
fixes for vim style visual selection changes
2014-11-17 23:01:00 +01:00
Oliver Kiddle
36878852ef 33636: add support for a linewise visual selection mode 2014-11-17 22:50:34 +01:00
Oliver Kiddle
492b6cec28 33635: adapt region to function as vim style visual selection mode 2014-11-17 22:47:59 +01:00
Oliver Kiddle
0ea8f28e7b 33700: new widget for put in vim style visual selection mode 2014-11-17 16:32:04 +01:00
Oliver Kiddle
25cc978a99 33633: support vim style text objects 2014-11-17 00:49:32 +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
1e934556f7 33697: new vim style vi-backward-word-end widgets 2014-11-15 21:33:32 +01:00
Oliver Kiddle
13f3eec61d 33696: simple up/down line widgets that don't go through history lines 2014-11-15 21:31:29 +01:00
Oliver Kiddle
f26abf3a17 33695: fix various vi-indent problems and vi-swap-case on a blank line 2014-11-15 21:27:44 +01:00
Oliver Kiddle
99382e689d 33669: allow an empty line to be yanked with yy
This  by allocating 1 byte instead of 0 for the empty buffer.
2014-11-13 09:58:34 +01:00
Oliver Kiddle
f01188ec2a 33639: fix bug with vi operators on a blank line
and with backward bracket matching
2014-11-09 17:51:26 +01:00