Problem: possible to escape bracketed paste mode with Ctrl-C
Solution: Do not handle Ctrl-C specially when key_protocol
is in use, makes bracketed paste mode more robust
When a key protocol is in use Ctrl-C will be sent as an escape sequence,
but a raw Ctrl-C can be sent when pasting data. Pass this through, so
that a Ctrl-C can be pasted and won't result in exiting insert mode
(where the rest of the pasted keys can cause all kind of nasty
side-effects).
Many terminals will strip control characters in paste data (and xterm
will strip ^C since version 388), but this provides some defense in
depth if users change settings like xterm's allowPasteControls.
closes: #13398
Signed-off-by: David Leadbeater <dgl@dgl.cx>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: wrong mapping applied when replaying a char search
Solution: Store a NOP after the ESC
closes: #12708closes: #6350
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Problem: Cursor briefly displayed in a wrong position when pressing Esc in
Insert mode after autoindent was used.
Solution: Do not adjust the cursor position for assumed deleted white space
if text is following. (closes#11877)
Problem: Cannot detect whether modifyOtherKeys is enabled.
Solution: Use XTQMODKEYS introduced by xterm version 377 to request the
modifyOtherKeys level. Update the keycode check results.
Problem: Pretending to go out of Insert mode when Esc is received has side
effects.
Solution: When the kitty keyboard protocol is enabled expect Esc to always
be the start of an escape sequence.
Problem: Still using simplified mappings when using the kitty keyboard
protocol.
Solution: Use the kitty_protocol_state value to decide whether to use
simplified mappings. Improve how seenModifyOtherKeys is set and
reset.
Problem: MS-Windows: modifier keys do not work with mouse scroll events.
Solution: Use K_SPECIAL instead of CSI for the modifier keys. (Christopher
Plewright, closes#11587)
Problem: libvterm with modifyOtherKeys level 2 does not match xterm.
Solution: Adjust key code escape sequences to be the same as what xterm
sends in modifyOtherKeys level 2 mode. Check the value of
no_reduce_keys before using it.
Problem: 'langmap' works differently when there are modifiers.
Solution: Only apply 'langmap' to a character where modifiers have no
effect. (closes#11395, closes#11404)
Problem: MS-Windows: mouse scroll events only work with the dll.
Solution: Accept CSI codes for MS-Windows without the GUI. (Christopher
Plewright, closes#11401)
Problem: Too many #ifdefs.
Solution: Graduate the +cmdwin feature. Now the tiny and small builds are
equal, drop the small build. (Martin Tournoij, closes#11268)
Problem: repeating a <ScriptCmd> mapping does not use the right script
context.
Solution: When using a mapping put <SID>{sid}; in the redo buffer.
(closes#11049)
Problem: GUI: when CTRL-D is mapped in Insert mode it gets inserted.
(Yasuhiro Matsumoto)
Solution: Also recognize modifier starting with CSI. (closes#11057)
Problem: The command line takes up space even when not used.
Solution: Allow for 'cmdheight' to be set to zero. (Shougo Matsushita,
closes#10675, closes#940)
Problem: Local completion with mappings and simplification not working.
Solution: Fix local completion <C-N>/<C-P> mappings not ignored if keys are
not simplified. (closes#10323)
Problem: Modifiers not simplified when timed out or using feedkeys() with
'n" flag.
Solution: Adjust how mapped flag and timeout are used. (closes#10305)