aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
Commit message (Collapse)AuthorAge
...
* | vim-patch:8.2.4236: accessing freed memoryChristian Clason2022-01-28
| | | | | | | | | | | | Problem: Accessing freed memory. Solution: Set the bh_curr pointer to NULL. https://github.com/vim/vim/commit/166788c657f4b1090a31ea37a023b1f2c78790c8
* | vim-patch:8.2.4235: invalid check for NULL pointerChristian Clason2022-01-28
| | | | | | | | | | | | Problem: Invalid check for NULL pointer. Solution: Remove the check. https://github.com/vim/vim/commit/37cf413e3e768b76c975e4a7081472d75d649c72
* | vim-patch:8.2.4233: crash when recording and using Select modeChristian Clason2022-01-28
| | | | | | | | | | | | | | Problem: Crash when recording and using Select mode. Solution: When deleting the last recorded character check there is something to delete. https://github.com/vim/vim/commit/a4bc2dd7cccf5a4a9f78b58b6f35a45d17164323
* | vim-patch:8.2.4002: first char typed in Select mode can be wrongzeertzjq2022-01-24
| | | | | | | | | | | | | | | | | | | | | | | | Problem: First char typed in Select mode can be wrong. Solution: Escape special bytes in the input buffer. (closes vim/vim#9469) https://github.com/vim/vim/commit/6cac77016b1636e04073e8348b7cee02259ef928 The `buf` should already be large enough, but I'll change its size anyway in case future patches change the meaning of `MB_MAXBYTES` macro. `fix_input_buffer()` cannot be used here because of the `using_script()` check, and there is already equivalent code in its place.
* | vim-patch:8.2.3993: when recording a change in Select mode char appears twicezeertzjq2022-01-24
|/ | | | | | | | Problem: When recording a change in Select mode the first typed character appears twice. Solution: When putting the character back into typeahead remove it from recorded characters. (closes vim/vim#9462) https://github.com/vim/vim/commit/c88e977862ba6477a3b5b28706c45f96069a3073
* fix(input): put modifiers back into typeahead buffer when neededzeertzjq2022-01-23
|
* refactor: remove CSI unescaping and clean up related names and commentszeertzjq2022-01-21
|
* fix(input): never escape CSI byteszeertzjq2022-01-21
|
* feat(api): add support for lua function & description in keymapshadmansaleh2022-01-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Behavioral changes: 1. Added support for lua function in keymaps in -------------------------------------------- - nvim_set_keymap Can set lua function as keymap rhs like following: ```lua vim.api.nvim_{buf_}set_keymap('n', '<leader>lr', '', {callback = vim.lsp.buf.references}) ``` Note: lua function can only be set from lua . If api function being called from viml or over rpc this option isn't available. - nvim_{buf_}get_keymap When called from lua, lua function is returned is `callback` key . But in other cases callback contains number of the function ref. - :umap, nvim_del_keymap & nvim_buf_del_keymap clears lua keymaps correctly. - :map commands for displaing rhs . For lua keymaps rhs is displayed as <Lua function ref_no> Note: lua keymap cannot be set through viml command / functions. - mapargs() When dict is false it returns string in `<Lua function ref_no>` format (same format as :map commands). When dict is true it returns ref_no number in `callback` key. - mapcheck() returns string in `<Lua function ref_no>` format (same format as :map commands). 2. Added support for keymap description --------------------------------------- - nvim_{buf_}set_keymap: added `desc` option in opts table . ```lua vim.api.nvim_set_keymap('n', '<leader>w', '<cmd>w<cr>', {desc='Save current file'}) ``` - nvim_{buf_}get_keymap: contains `desc` in returned list. - commands like `:nmap <leader>w` will show description in a new line below rhs. - `maparg()` return dict contains `desc`.
* vim-patch:8.2.3914 (#16808)dundargoc2021-12-28
| | | | | | | | | * vim-patch:8.2.3914: various spelling mistakes in comments Problem: Various spelling mistakes in comments. Solution: Fix the mistakes. (Dominique Pellé, closes vim/vim#9416) https://github.com/vim/vim/commit/af4a61a85d6e8cacc35324f266934bc463a21673 Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* vim-patch:8.2.3825: various comments could be improvedzeertzjq2021-12-16
| | | | | | Problem: Various comments could be improved. Solution: Improve the comments. https://github.com/vim/vim/commit/52797bae1710621926c03a2611c40a692c96fb44
* refactor(misc1): move out high-level input functions to a new file: input.cBjörn Linse2021-12-10
| | | | | Possibly dialog code is messages.c could be moved here as well. misc1.c is now empty, so delete it.
* refactor(misc1): move way beep functions elsewhereBjörn Linse2021-12-10
|
* vim-patch:8.1.1798: warning for unused variable in tiny versionzeertzjq2021-12-07
| | | | | | Problem: Warning for unused variable in tiny version. (Tony Mechelynck) Solution: Move inside #ifdef. Reformat code. https://github.com/vim/vim/commit/eda35f7127c6ac51573eda808687f6369c31ee2d
* vim-patch:8.1.1797: the vgetorpeek() function is too longzeertzjq2021-12-07
| | | | | | Problem: The vgetorpeek() function is too long. Solution: Split off the part that handles mappings, with fix. https://github.com/vim/vim/commit/edd680f3649c47d7ed5818e356e7c47f874f5cf8
* lint (#16526)Jan Edmund Lazo2021-12-05
|
* refactor: saner options for uncrustify (#16204)dundargoc2021-11-19
| | | | | | | | | | | | | | | | | | | | | | | | * sp_enum_after_assign = force * sp_brace_typedef = force * nl_do_brace = remove * sp_do_brace_open = force * sp_brace_close_while = force * sp_before_semi = remove * sp_before_semi_for = remove * sp_before_semi_for_empty = remove * sp_between_semi_for_empty = remove * sp_after_semi_for_empty = remove * sp_before_square = remove * sp_before_squares = remove * sp_inside_square = remove * sp_inside_fparens = remove * sp_inside_fparen = remove * sp_inside_tparen = remove * sp_after_tparen_close = remove * sp_return_paren = force * pos_bool = lead * sp_pp_concat = remove * sp_pp_stringify = remove * fixup: disable formatting for the INIT section
* refactor(macros): delete multibyte macros which just are aliasesBjörn Linse2021-11-14
|
* refactor(multibyte): eliminate mb_ptr2len alias for utfc_ptr2lenBjörn Linse2021-11-14
|
* fix(input): never reinterpret unmapped ALT- chrods in Terminal mode (#16222)zeertzjq2021-11-04
|
* vim-patch:8.1.0779: argument for message functions is inconsistentJames McCoy2021-11-01
| | | | | | Problem: Argument for message functions is inconsistent. Solution: Make first argument to msg() "char *". https://github.com/vim/vim/commit/32526b3c1846025f0e655f41efd4e5428da16b6c
* vim-patch:8.1.0743: giving error messages is not flexibleJames McCoy2021-11-01
| | | | | | | | | Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts. https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
* refactor: saner options for uncrustify #16196dundargoc2021-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor: general good option changes sp_deref = remove sp_not = remove sp_inv = remove sp_inside_paren_cast = remove mod_remove_duplicate_include = true sp_after_semi = add sp_after_semi_for = force sp_sizeof_paren = remove nl_return_expr = remove nl_else_brace = remove nl_else_if = remove * refactor: mod_remove_extra_semicolon = true * refactor: nl_max = 3 * refactor: sp_bool = force * refactor: sp_compare = force * refactor: sp_inside_paren = remove * refactor: sp_paren_paren = remove * refactor: sp_inside_sparen = remove * refactor: sp_before_sparen = force * refactor: sp_sign = remove * refactor: sp_addr = remove * refactor: sp_member = remove * refactor: nl_struct_brace = remove * refactor: nl_before_if_closing_paren = remove * refactor: nl_fdef_brace = force * refactor: sp_paren_comma = force * refactor: mod_full_brace_do = add
* vim-patch:8.1.2380: using old C style commentsDundar Göc2021-10-21
| | | | | | Problem: Using old C style comments. Solution: Use // comments where appropriate. https://github.com/vim/vim/commit/306139005c31ea7e6f892dd119beba3c94dcb982
* refactor: reduce number of unique char castsDundar Göc2021-10-13
|
* refactor: reduce number of unique char casts (#15995)dundargoc2021-10-12
|
* vim-patch:8.2.3490: superfluous return statements #15978dundargoc2021-10-09
| | | | | | Problem: Superfluous return statements. Solution: Remove superfluous return statements from void functions. (closes vim/vim#8977) https://github.com/vim/vim/commit/3826c0513bc9370583be550c864358c7eeb5605a
* refactor: remove redundant char casts #15888dundargoc2021-10-04
|
* vim-patch:8.2.3460: some type casts are not needed #15868dundargoc2021-10-02
| | | | | Problem: Some type casts are not needed. Solution: Remove unnecessary type casts. (closes vim/vim#8934) https://github.com/vim/vim/commit/dfa5e464d459f84200a73d178f1ecefe75bbe511
* fix(input): resolve isolated (non-ALT/META) mappings #13109erw72021-10-02
| | | | | | | | | | | | | | Problem: Since 2f06413dfb36 #13042, "ESC+c" sequence is treated as "ESC c" instead of "M-c" (ALT/META+c) when not mapped, aka "fallthrough" behavior. But "isolated" (non-ALT/META) mappings to ESC and c were not resolved. This behavior is especially confusing for the TUI. Solution: Resolve isolated ESC, c mappings when there is no M-c mapping. Change ins_char_typebuf() to escape CSI, K_SPECIAL. fixes #13086 fixes #15869
* refactor: reformat with uncrustify #15736dundargoc2021-09-20
| | | | * fix function parameter comments * remove space after star in function names
* refactor: convert TRUE/FALSE to true/false (#15660)dundargoc2021-09-18
|
* feat(lua)!: register_keystroke_callback => on_keyJustin M. Keyes2021-09-09
| | | | | | | | | Analogous to nodejs's `on('data', …)` interface, here on_key is the "add listener" interface. ref 3ccdbc570d85 #12536 BREAKING_CHANGE: vim.register_keystroke_callback() is now an error.
* refactor(api): remove unneccesary indirection around handlesBjörn Linse2021-08-22
| | | | | These things are just maps to pointers, no need to perform a huge song and dance around it.
* Merge pull request #15249 from dundargoc/refactor/a-song-of-true-and-falseBjörn Linse2021-08-18
|\ | | | | refactor: replace TRUE/FALSE with true/false
| * refactor: replace TRUE/FALSE with true/falseDundar Göc2021-08-12
| |
* | feat: defaults: set undo points in <C-U> and <C-W> (#15400)Gregory Anders2021-08-16
| |
* | feat(defaults): map CTRL-L to search highlights, update diffs #15385Gregory Anders2021-08-16
|/
* refactor(plines): move horizontal size functions to plines.cBjörn Linse2021-08-11
| | | | fix style.
* Remove EXMODE_NORMALmatveyt2021-07-23
|
* chore: use codespell to spell check #15016dundargoc2021-07-07
|
* vim-patch:8.2.2833: two key command cancelled by moving mouse when using popupJan Edmund Lazo2021-05-06
| | | | | | | Problem: Two key command cancelled by moving mouse when using popup. (Sergey Vlasov) Solution: Ignore K_MOUSEMOVE in plain_vgetc(). https://github.com/vim/vim/commit/3a00659db740ebcf0be6153b47a5734eea4a18ba
* vim-patch:8.2.1166: once mouse move events are enabled getchar() returns themJan Edmund Lazo2021-05-06
| | | | | | Problem: Once mouse move events are enabled getchar() returns them. Solution: Ignore K_MOUSEMOVE in getchar(). (closes vim/vim#6424) https://github.com/vim/vim/commit/ae97b94176062d30ea8c68bb83cde034c5150c78
* vim-patch:8.2.2819: finishing an abbreviation with multi-byte char may not workJan Edmund Lazo2021-05-05
| | | | | | Problem: Finishing an abbreviation with a multi-byte char may not work. Solution: Escape K_SPECIAL in the typed character. (closes vim/vim#8160) https://github.com/vim/vim/commit/4934ed34c3e2090d1963c89c629cd3ce81d3ecd1
* vim-patch:8.1.2380: using old C style commentsJan Edmund Lazo2021-03-29
| | | | | | Problem: Using old C style comments. Solution: Use // comments where appropriate. https://github.com/vim/vim/commit/306139005c31ea7e6f892dd119beba3c94dcb982
* Revert "vim-patch:8.1.0822: peeking and flushing output slows down execution"Jan Edmund Lazo2020-12-31
| | | | This reverts commit 0519a75f6eca1065a4d0184f99c71ae03a99b9b1.
* vim-patch:8.1.0822: peeking and flushing output slows down executionJan Edmund Lazo2020-12-25
| | | | | | | Problem: Peeking and flushing output slows down execution. Solution: Do not update the mode message when global_busy is set. Do not flush when only peeking for a character. (Ken Takata) https://github.com/vim/vim/commit/cb574f415486adff645ce384979bfecf27f5be8c
* vim-patch:8.2.2005: redoing a mapping with <Cmd> doesn't work properlyBjörn Linse2020-11-18
| | | | | | | Problem: Redoing a mapping with <Cmd> doesn't work properly. Solution: Fill the redo buffer. Use "<SNR>" instead of a key code. (closes vim/vim#7282) https://github.com/vim/vim/commit/c77534c303721df4024fd6cfd51098d593b7d4da
* vim-patch:8.1.0810: too many #ifdefsJan Edmund Lazo2020-11-12
| | | | | | Problem: Too many #ifdefs. Solution: Graduate FEAT_MBYTE, part 4. https://github.com/vim/vim/commit/264b74fa545edfb92c0d7d08a02c26331cc5b168
* vim-patch:8.2.1547: various comment problemsJan Edmund Lazo2020-10-18
| | | | | | Problem: Various comment problems. Solution: Update comments. https://github.com/vim/vim/commit/02c037a4be6aeb7f6376e7dcc3ab41cfc6db3ede