aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
Commit message (Collapse)AuthorAge
* vim-patch:8.1.2057: the screen.c file is much too bigLewis Russell2022-08-19
| | | | | | | | | | | | | | | Problem: The screen.c file is much too big. Solution: Split it in three parts. (Yegappan Lakshmanan, closes vim/vim#4943) https://github.com/vim/vim/commit/7528d1f6b5422750eb778dfb550cfd0b0e540964 This is an approximation vim-patch 8.1.2057. Applying the patch directly isn't feasible since our version of screen.c has diverged too much, however we still introduce drawscreen.c and drawline.c: - screen.c is now a much smaller file used for low level screen functions - drawline.c contains everything needed for win_line() - drawscreen.c contains everything needed for update_screen() Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* refactor: change pre-decrement/increment to post (#19799)Lewis Russell2022-08-16
| | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* vim-patch:8.1.2042: the evalfunc.c file is too big (#19792)zeertzjq2022-08-16
| | | | | | | Problem: The evalfunc.c file is too big. Solution: Move getchar() and parse_queued_messages() to getchar.c. https://github.com/vim/vim/commit/9c658c9eacbd97e2c071f652a0155f71db94c0f3 Omit parse_queued_messages(): Nvim does not have MESSAGE_QUEUE.
* refactor: remove some unused includes (#19740)zeertzjq2022-08-12
| | | | Mostly avoids including eval.h, ex_cmds2.h and ex_docmd.h in other headers.
* vim-patch:8.1.1210: support for user commands is spread out (#19653)zeertzjq2022-08-06
| | | | | | | Problem: Support for user commands is spread out. No good reason to make user commands optional. Solution: Move user command support to usercmd.c. Always enable the user_commands feature. https://github.com/vim/vim/commit/ac9fb18020d7e8bf16d02d45fbb02cf47328aaf7
* docs: fix typos (#19588)dundargoc2022-08-03
| | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: notomo <notomo.motono@gmail.com>
* fix(input): do no reinterpret mouse keys with ALT modifierszeertzjq2022-07-25
| | | | | Remove check for MOD_MASK_META as it is for <T- which never appears in TUI. Make small changes to docs.
* vim-patch:9.0.0059: test file has wrong namezeertzjq2022-07-23
| | | | | | Problem: Test file has wrong name. Solution: Rename the file. Various small fixes. (closes vim/vim#10674) https://github.com/vim/vim/commit/bb404f5ad5ec909318bc24e5b82e4ed7b87ba8f4
* vim-patch:8.1.1076: file for Insert mode is much too bigzeertzjq2022-07-20
| | | | | | | | | | | | Problem: File for Insert mode is much too big. Solution: Split off the code for Insert completion. (Yegappan Lakshmanan, closes vim/vim#4044) https://github.com/vim/vim/commit/7591bb39d58ece38a5fef984a08ea9012616c1f9 Cherry-pick ins_compl_len() -> get_compl_len() from patch 8.2.4001. Revert a71c5e9eb98fbb2ca88510269935cdcda37369fc: ctrl_x_mode is no longer a global variable, so l_ctrl_x_mode is no longer needed.
* vim-patch:8.2.0274: hang with combination of feedkeys(), Ex mode and :globalzeertzjq2022-07-08
| | | | | | | Problem: Hang with combination of feedkeys(), Ex mode and :global. (Yegappan Lakshmanan) Solution: Add the pending_exmode_active flag. https://github.com/vim/vim/commit/9e2bcb5d23138d45a0b6f9c1542b5facc807efe7
* feat(tui): recognize keypad keys when using kitty keyboard protocolerw72022-07-04
|
* vim-patch:9.0.0024: may access part of typeahead buf that isn't filledzeertzjq2022-07-03
| | | | | | Problem: May access part of typeahead buf that isn't filled. Solution: Check length of typeahead. https://github.com/vim/vim/commit/af043e12d9e5869c597de40b9a2517ae97ac72e7
* refactor: replace char_u #18429dundargoc2022-06-28
| | | Work on https://github.com/neovim/neovim/issues/459
* refactor(map): statically initialize maphash arraybfredl2022-06-24
|
* refactor: move some mapping-related code to a separate file (#19061)zeertzjq2022-06-23
| | | | | | | | | | | | | | | | | | | This marks the following Vim patches as ported: vim-patch:8.1.1785: map functionality mixed with character input Problem: Map functionality mixed with character input. Solution: Move the map functionality to a separate file. (Yegappan Lakshmanan, closes vim/vim#4740) Graduate the +localmap feature. https://github.com/vim/vim/commit/b66bab381c8ba71fd6e92327d1d34c6f8a65f2a7 vim-patch:8.2.3643: header for source file is outdated Problem: Header for source file is outdated. Solution: Make the header more accurate. (closes vim/vim#9186) https://github.com/vim/vim/commit/a3f83feb63eae5464a620ae793c002eb45f7a838 Also cherry-pick a change for <unique> mappings from patch 8.2.0807. Rename map_clear_mode() to do_mapclear().
* fix(input): use correct grid when restoring cursor for <expr> mapping (#19047)zeertzjq2022-06-23
|
* vim-patch:8.2.5076: unnecessary code (#18922)zeertzjq2022-06-11
| | | | | Problem: Unnecessary code. Solution: Remove code and replace with function call. (closes vim/vim#10552) https://github.com/vim/vim/commit/2e7cba347fc8b746add12aa5e0e9f6218a76c788
* fix(input): fix macro recording with ALT and special key (#18917)zeertzjq2022-06-10
|
* fix(input): allow Ctrl-C to interrupt a recursive mapping even if mapped ↵zeertzjq2022-06-07
| | | | (#18885)
* vim-patch:8.2.5064: no test for what 8.1.0052 fixes (#18881)zeertzjq2022-06-07
| | | | | Problem: No test for what 8.1.0052 fixes. Solution: Add a test. (closes vim/vim#10531) https://github.com/vim/vim/commit/3760bfddc414e4d3e1c4203db8c22e293cf08d09
* vim-patch:8.2.5058: input() does not handle composing characters properly ↵zeertzjq2022-06-06
| | | | | | | | | | (#18872) Problem: input() does not handle composing characters properly. Solution: Use mb_cptr2char_adv() instead of mb_ptr2char_adv(). (closes vim/vim#10527) https://github.com/vim/vim/commit/e3a529bc877909a9eccf792461050b4f6737ed33 Cherry-pick all of Test_input_func() from patch 8.2.0316.
* refactor: correct comments and assertions about mapping rhs <Nop> (#18821)zeertzjq2022-06-01
| | | | | | | | Also avoid referring to mappings as "keymaps" in commands and docs. *map_empty_rhs* *map-empty-rhs* You can create an empty {rhs} by typing nothing after a single CTRL-V (you have to type CTRL-V two times). Unfortunately, you cannot do this in a vimrc file.
* refactor: missing parenthesis may cause unexpected problems (#17443)kylo2522022-05-26
| | | related vim-8.2.{4402,4639}
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* refactor!: delete insertmode (#18547)Gregory Anders2022-05-22
| | | | | | | Neovim already removed `evim` (or any similar flags). The 'insertmode' option is a weird remnant, so get rid of it. The 'insertmode' option is replaced with a script that closely emulates the option. This script is documented at :help 'insertmode'
* refactor!: remove 'remap' optionDundar Goc2022-05-19
| | | | | An option that should always be kept on except for when working with old Vi scripts is of little use to us.
* refactor: replace char_u variables and functions with charDundar Goc2022-05-16
| | | | Work on https://github.com/neovim/neovim/issues/459
* revert: "feat(mappings): do not simplify the rhs of a mapping" (#18553)zeertzjq2022-05-13
| | | | This reverts commit 7ac5359143ef25c4c8c0c427d5533f8d5824ed17. This fix can cause more problems than it solves.
* feat(defaults): search selection by * and # in visual mode (#18538)yamatsum2022-05-13
|
* Merge pull request #18489 from dundargoc/refactor/remove-char_ubfredl2022-05-13
|\ | | | | refactor: replace char_u variables and functions with char
| * refactor: replace char_u variables and functions with charDundar Goc2022-05-11
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
* | refactor: rename keymap.{c,h} to keycodes.{c,h} (#18535)zeertzjq2022-05-12
|/ | | | | | | | Most code in keymap.h is for keycode definitions, while most code in keymap.c is for the parsing and conversion of keycodes. The name "keymap" may also make people think these two files are for mappings, while in fact keycodes are used even when no mappings are involved, so "keycodes" should be a better file name than "keymap".
* vim-patch:8.2.4911: the mode #defines are not clearly named (#18499)zeertzjq2022-05-10
| | | | | | | | Problem: The mode #defines are not clearly named. Solution: Prepend MODE_. Renumber them to put the mapped modes first. https://github.com/vim/vim/commit/249591057b4840785c50e41dd850efb8a8faf435 A hunk from the patch depends on patch 8.2.4861, which hasn't been ported yet, but that should be easy to notice.
* refactor: replace char_u variables and functions with charDundar Goc2022-05-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-07
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-05
| | | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:8.2.4867: listing of mapping with K_SPECIAL is wrong (#18419)zeertzjq2022-05-05
| | | | | | | | | Problem: Listing of mapping with K_SPECIAL is wrong. Solution: Adjust escaping of special characters. (closes vim/vim#10351) https://github.com/vim/vim/commit/ac402f4d64bec6b6efd809fef52f5b34627bf947 Avoid overshadowing. Cherry-pick Test_list_mapping() from Vim patches 8.2.{0148,2994}. Fix rhs_is_noop.
* refactor: replace char_u variables and functions with charDundar Goc2022-05-04
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-03
| | | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:8.2.4848: local completion with mappings and simplification not ↵zeertzjq2022-04-30
| | | | | | | | | working 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 vim/vim#10323) https://github.com/vim/vim/commit/ee4460306917431d0d17a7cb11c6646f4c6540b6
* vim-patch:8.1.2191: when using modifyOtherKeys CTRL-X mode may not workzeertzjq2022-04-30
| | | | | | Problem: When using modifyOtherKeys CTRL-X mode may not work. Solution: Recognize a control character also in the form with a modifier. https://github.com/vim/vim/commit/88d3d09e07dbe0e3ea450bc554e2aadc451450d2
* fix(input): only disable mapped CTRL-C interrupts when getting input (#18310)zeertzjq2022-04-30
|
* Merge pull request #18162 from dundargoc/refactor/unctustifybfredl2022-04-29
|\ | | | | refactor/uncrustify
| * refactor(uncrustify): change rules to better align with the style guideDundar Goc2022-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | Add space around arithmetic operators '+' and '-'. Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. Remove space between '((' or '))' of control statements. Add space between ')' and '{' of control statements. Remove space between function name and '(' on function declaration. Collapse empty blocks between '{' and '}'. Remove newline at the end of the file. Remove newline between 'enum' and '{'. Remove newline between '}' and ')' in a function invocation. Remove newline between '}' and 'while' of 'do' statement.
| * refactor(uncrustify): format all c code under /src/nvim/Dundar Goc2022-04-29
| |
* | feat(mappings): do not simplify the rhs of a mappingzeertzjq2022-04-29
| |
* | feat(mappings): allow special keys and modifiers in <Cmd> mappingzeertzjq2022-04-29
|/
* fix(mappings): fix double-free when unmapping simplifiable Lua mappingzeertzjq2022-04-29
|
* feat(mappings): do not replace existing mapping for simplified formzeertzjq2022-04-29
|
* vim-patch:8.2.4837: modifiers not simplified when timed outzeertzjq2022-04-29
| | | | | | | Problem: Modifiers not simplified when timed out or using feedkeys() with 'n" flag. Solution: Adjust how mapped flag and timeout are used. (closes vim/vim#10305) https://github.com/vim/vim/commit/68a573ce2b996602a86b14d9b258ebb8c657604f