summaryrefslogtreecommitdiffstats
path: root/src/getchar.c
AgeCommit message (Collapse)Author
2024-04-22patch 9.1.0365: Crash when typing many keys with D- modifierv9.1.0365zeertzjq
Problem: Crash when typing many keys with D- modifier (after 9.1.0227). Solution: Don't treat a 0x80 byte inside a special sequence as the start of a special sequence (zeertzjq). closes: #14613 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-18patch 9.1.0351: No test that completing a partial mapping clears 'showcmd'v9.1.0351zeertzjq
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>
2024-04-17patch 9.1.0343: 'showcmd' wrong for partial mapping with multibytev9.1.0343zeertzjq
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>
2024-04-07patch 9.1.0274: MS-Windows: a few compiler warningsv9.1.0274Mike Williams
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>
2024-03-29patch 9.1.0227: Recording may still be wrong in Select modev9.1.0227zeertzjq
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>
2024-01-28patch 9.1.0060: Recorded register cannot be translated using keytrans()v9.1.0060zeertzjq
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>
2024-01-04patch 9.1.0006: is*() and to*() function may be unsafev9.1.0006Keith Thompson
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>
2023-10-26patch 9.0.2069: possible to escape bracketed paste mode with Ctrl-Cv9.0.2069David Leadbeater
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>
2023-08-12patch 9.0.1694: wrong mapping applied when replaying a char searchv9.0.1694zeertzjq
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>
2023-05-31patch 9.0.1594: some internal error messages are translatedv9.0.1594RestorerZ
Problem: Some internal error messages are translated. Solution: Consistently do not translate internal error messages. (closes #12459)
2023-05-07patch 9.0.1521: failing redo of command with control charactersv9.0.1521zeertzjq
Problem: Failing redo of command with control characters. Solution: Use AppendToRedobuffLit() for colon commands. (closes #12354)
2023-05-06patch 9.0.1516: cannot use special keys in <Cmd> mappingv9.0.1516zeertzjq
Problem: Cannot use special keys in <Cmd> mapping. Solution: Do allow for special keys in <Cmd> and <ScriptCmd> mappings. (closes #12326)
2023-04-22patch 9.0.1479: small source file problems; outdated list of distrib. filesv9.0.1479Bram Moolenaar
Problem: Small source file problems; outdated list of distributed files. Solution: Small updates to source files and list of distributed files.
2023-03-18patch 9.0.1414: <M-S-x> in Kitty does not use the Shift modifierv9.0.1414Bram Moolenaar
Problem: <M-S-x> in Kitty does not use the Shift modifier. Solution: Apply the Shift modifier to ASCII letters. (closes #11913)
2023-03-07patch 9.0.1392: using NULL pointer with nested :open commandv9.0.1392Bram Moolenaar
Problem: Using NULL pointer with nested :open command. Solution: Check that ccline.cmdbuff is not NULL.
2023-02-20patch 9.0.1333: when redo'ing twice <ScriptCmd> may not get the script IDv9.0.1333Bram Moolenaar
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)
2023-02-05patch 9.0.1285: various small problemsv9.0.1285Bram Moolenaar
Problem: Various small problems. Solution: Adjust white space and comments.
2023-01-27patch 9.0.1251: checking returned value of ga_grow() is inconsistentv9.0.1251Yegappan Lakshmanan
Problem: Checking returned value of ga_grow() is inconsistent. Solution: Check for FAIL instaed of "not OK". (Yegappan Lakshmanan, closes #11897)
2023-01-25patch 9.0.1244: cursor displayed in wrong position when leaving Insert modev9.0.1244Bram Moolenaar
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)
2023-01-08patch 9.0.1158: code is indented more than necessaryv9.0.1158Yegappan Lakshmanan
Problem: Code is indented more than necessary. Solution: Use an early return where it makes sense. (Yegappan Lakshmanan, closes #11787)
2022-11-29patch 9.0.0974: even when Esc is encoded a timeout is usedv9.0.0974Bram Moolenaar
Problem: Even when Esc is encoded a timeout is used. Solution: Use K_ESC when an encoded Esc is found.
2022-11-26patch 9.0.0954: cannot detect whether modifyOtherKeys is enabledv9.0.0954Bram Moolenaar
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.
2022-11-24patch 9.0.0943: pretending to go out of Insert mode when Esc is receivedv9.0.0943Bram Moolenaar
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.
2022-11-24patch 9.0.0939: still using simplified mappings when using kitty protocolv9.0.0939Bram Moolenaar
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.
2022-11-22patch 9.0.0918: MS-Windows: modifier keys do not work with mouse scroll eventv9.0.0918Christopher Plewright
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)
2022-11-19patch 9.0.0912: libvterm with modifyOtherKeys level 2 does not match xtermv9.0.0912Bram Moolenaar
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.
2022-11-18patch 9.0.0904: various comment and indent flawsv9.0.0904Bram Moolenaar
Problem: Various comment and indent flaws. Solution: Improve comments and indenting.
2022-11-02patch 9.0.0828: various typosv9.0.0828dundargoc
Problem: Various typos. Solution: Correct typos. (closes #11432)
2022-10-21patch 9.0.0812: GUI mouse scrollwheel mappings don't workv9.0.0812Christopher Plewright
Problem: GUI mouse scrollwheel mappings don't work. Solution: Add check for "gui.in_use". (Christopher Plewright, closes #11418)
2022-10-20patch 9.0.0806: 'langmap' works differently when there are modifiersv9.0.0806zeertzjq
Problem: 'langmap' works differently when there are modifiers. Solution: Only apply 'langmap' to a character where modifiers have no effect. (closes #11395, closes #11404)
2022-10-20patch 9.0.0802: MS-Windows: cannot map console mouse scroll eventsv9.0.0802Christopher Plewright
Problem: MS-Windows: cannot map console mouse scroll events. Solution: Change CSI to K_SPECIAL when checking for a mapping. (Christopher Plewright, closes #11410)
2022-10-19patch 9.0.0793: MS-Windows: mouse scroll events only work with the dllv9.0.0793Christopher Plewright
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)
2022-10-13patch 9.0.0747: too many #ifdefsv9.0.0747Martin Tournoij
Problem: Too many #ifdefs. Solution: Gradudate the +cmdline_info feature. (Martin Tournoij, closes #11330)
2022-10-08patch 9.0.0694: no native sound support on Mac OSv9.0.0694Yee Cheng Chin
Problem: No native sound support on Mac OS. Solution: Add sound support for Mac OS. (Yee Cheng Chin, closes #11274)
2022-10-04patch 9.0.0657: too many #ifdefsv9.0.0657Martin Tournoij
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)
2022-09-24patch 9.0.0575: the getchar() function behaves strangely with bracketed pastev9.0.0575Bram Moolenaar
Problem: The getchar() function behaves strangely with bracketed paste. Solution: Do not handle paste-start in getchar(). (issue #11172)
2022-09-05patch 9.0.0387: repeat <ScriptCmd> mapping doesn't use right script contextv9.0.0387Bram Moolenaar
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)
2022-09-05patch 9.0.0385: GUI: when CTRL-D is mapped in Insert mode it gets insertedv9.0.0385zeertzjq
Problem: GUI: when CTRL-D is mapped in Insert mode it gets inserted. (Yasuhiro Matsumoto) Solution: Also recognize modifier starting with CSI. (closes #11057)
2022-08-31patch 9.0.0340: the 'cmdheight' zero support causes too much troublev9.0.0340Bram Moolenaar
Problem: The 'cmdheight' zero support causes too much trouble. Solution: Revert support for 'cmdheight' being zero.
2022-08-29patch 9.0.0318: clearing screen causes flickerv9.0.0318Bram Moolenaar
Problem: Clearing screen causes flicker. Solution: Do not clear but redraw in more cases. Add () to "wait_return".
2022-08-21patch 9.0.0234: cannot make difference between :normal end and argument charv9.0.0234Bram Moolenaar
Problem: Cannot make difference between the end of :normal and a character in its argument. Solution: Add the "typebuf_was_empty" flag. (closes #10950)
2022-08-14patch 9.0.0206: redraw flags are not named specificallyv9.0.0206Bram Moolenaar
Problem: Redraw flags are not named specifically. Solution: Prefix "UPD_" to the flags, for UPDate_screen().
2022-07-30patch 9.0.0114: the command line takes up space even when not usedv9.0.0114Shougo Matsushita
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)
2022-07-25patch 9.0.0067: cannot show virtual textv9.0.0067Bram Moolenaar
Problem: Cannot show virtual text. Solution: Initial changes for virtual text support, using text properties.
2022-07-23patch 9.0.0059: test file has wrong namev9.0.0059zeertzjq
Problem: Test file has wrong name. Solution: Rename the file. Various small fixes. (closes #10674)
2022-07-06patch 9.0.0044: typos in comments, wrapping linesv9.0.0044Bram Moolenaar
Problem: Typos in comments, wrapping lines. Solution: Adjust comments. Wrap lines.
2022-07-02patch 9.0.0024: may access part of typeahead buf that isn't filledv9.0.0024Bram Moolenaar
Problem: May access part of typeahead buf that isn't filled. Solution: Check length of typeahead.
2022-06-10patch 8.2.5076: unnecessary codev8.2.5076zeertzjq
Problem: Unnecessary code. Solution: Remove code and replace with function call. (closes #10552)
2022-06-06patch 8.2.5064: no test for what 8.1.0052 fixesv8.2.5064zeertzjq
Problem: No test for what 8.1.0052 fixes. Solution: Add a test. (closes #10531)
2022-06-05patch 8.2.5058: input() does not handle composing characters properlyv8.2.5058zeertzjq
Problem: input() does not handle composing characters properly. Solution: Use mb_cptr2char_adv() instead of mb_ptr2char_adv(). (closes #10527)