Age | Commit message (Collapse) | Author |
|
Problem: No test that completing a partial mapping clears 'showcmd'.
Solution: Complete partial mappings in Test_showcmd_part_map() instead
of using :echo. Adjust some comments (zeertzjq).
closes: #14580
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: 'showcmd' is wrong for partial mapping with multibyte char,
and isn't very readable with modifyOtherKeys.
Solution: Decode multibyte char and merge modifiers into the char.
(zeertzjq)
This improves the following situations:
- Multibyte chars whose individual bytes are considered unprintable are
now shown properly in 'showcmd' area.
- Ctrl-W with modifyOtherKeys now shows ^W in 'showcmd' area.
The following situation may still need improvement:
- If the char is a special key or has modifiers that cannot be merged
into it, internal keycodes are shown in 'showcmd' area like before.
This applies to keys typed in Normal mode commands as well, and it's
hard to decide how to make it more readable due to the limited space
taken by 'showcmd', so I'll leave it for later.
closes: #14572
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: MS-Windows: a few compiler warnings
Solution: Change variable types to resolve compiler warnings
(Mike Williams)
Windows compiles were reporting a few size_t to signed integer
conversion warnings that can be resolved by changing the variable
declarations to be size_t to start with.
closes: #14429
Signed-off-by: Mike Williams <mrmrdubya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: Recording may still be wrong in Select mode (after 8.2.3993).
Solution: Make sure a character isn't split between two buffer blocks.
(zeertzjq)
closes: #14326
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: Recorded register cannot be translated using keytrans() when
it involves character search (iddqd505)
Solution: Record a K_IGNORE instead of a K_NOP (zeertzjq)
related: #13916
closes: #13925
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: is*() and to*() function may be unsafe
Solution: Add SAFE_* macros and start using those instead
(Keith Thompson)
Use SAFE_() macros for is*() and to*() functions
The standard is*() and to*() functions declared in <ctype.h> have
undefined behavior for negative arguments other than EOF. If plain char
is signed, passing an unchecked value from argv for from user input
to one of these functions has undefined behavior.
Solution: Add SAFE_*() macros that cast the argument to unsigned char.
Most implementations behave sanely for negative arguments, and most
character values in practice are non-negative, but it's still best
to avoid undefined behavior.
The change from #13347 has been omitted, as this has already been
separately fixed in commit ac709e2fc0db6d31abb7da96f743c40956b60c3a
(v9.0.2054)
fixes: #13332
closes: #13347
Signed-off-by: Keith Thompson <Keith.S.Thompson@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
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: #12708
closes: #6350
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
Problem: Some internal error messages are translated.
Solution: Consistently do not translate internal error messages.
(closes #12459)
|
|
Problem: Failing redo of command with control characters.
Solution: Use AppendToRedobuffLit() for colon commands. (closes #12354)
|
|
Problem: Cannot use special keys in <Cmd> mapping.
Solution: Do allow for special keys in <Cmd> and <ScriptCmd> mappings.
(closes #12326)
|
|
Problem: Small source file problems; outdated list of distributed files.
Solution: Small updates to source files and list of distributed files.
|
|
Problem: <M-S-x> in Kitty does not use the Shift modifier.
Solution: Apply the Shift modifier to ASCII letters. (closes #11913)
|
|
Problem: Using NULL pointer with nested :open command.
Solution: Check that ccline.cmdbuff is not NULL.
|
|
Problem: When redo'ing twice <ScriptCmd> may not get the script ID.
Solution: When "last_used_map" map is not set use "last_used_sid".
(closes #11930)
|
|
Problem: Various small problems.
Solution: Adjust white space and comments.
|
|
Problem: Checking returned value of ga_grow() is inconsistent.
Solution: Check for FAIL instaed of "not OK". (Yegappan Lakshmanan,
closes #11897)
|
|
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: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes #11787)
|
|
Problem: Even when Esc is encoded a timeout is used.
Solution: Use K_ESC when an encoded Esc is found.
|
|
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: Various comment and indent flaws.
Solution: Improve comments and indenting.
|
|
Problem: Various typos.
Solution: Correct typos. (closes #11432)
|
|
Problem: GUI mouse scrollwheel mappings don't work.
Solution: Add check for "gui.in_use". (Christopher Plewright, closes #11418)
|
|
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: cannot map console mouse scroll events.
Solution: Change CSI to K_SPECIAL when checking for a mapping. (Christopher
Plewright, closes #11410)
|
|
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: Gradudate the +cmdline_info feature. (Martin Tournoij,
closes #11330)
|
|
Problem: No native sound support on Mac OS.
Solution: Add sound support for Mac OS. (Yee Cheng Chin, closes #11274)
|
|
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: The getchar() function behaves strangely with bracketed paste.
Solution: Do not handle paste-start in getchar(). (issue #11172)
|
|
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 'cmdheight' zero support causes too much trouble.
Solution: Revert support for 'cmdheight' being zero.
|
|
Problem: Clearing screen causes flicker.
Solution: Do not clear but redraw in more cases. Add () to "wait_return".
|
|
Problem: Cannot make difference between the end of :normal and a character
in its argument.
Solution: Add the "typebuf_was_empty" flag. (closes #10950)
|
|
Problem: Redraw flags are not named specifically.
Solution: Prefix "UPD_" to the flags, for UPDate_screen().
|
|
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: Cannot show virtual text.
Solution: Initial changes for virtual text support, using text properties.
|
|
Problem: Test file has wrong name.
Solution: Rename the file. Various small fixes. (closes #10674)
|
|
Problem: Typos in comments, wrapping lines.
Solution: Adjust comments. Wrap lines.
|
|
Problem: May access part of typeahead buf that isn't filled.
Solution: Check length of typeahead.
|
|
Problem: Unnecessary code.
Solution: Remove code and replace with function call. (closes #10552)
|
|
Problem: No test for what 8.1.0052 fixes.
Solution: Add a test. (closes #10531)
|
|
Problem: input() does not handle composing characters properly.
Solution: Use mb_cptr2char_adv() instead of mb_ptr2char_adv().
(closes #10527)
|
|
Problem: The mode #defines are not clearly named.
Solution: Prepend MODE_. Renumber them to put the mapped modes first.
|