aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
Commit message (Collapse)AuthorAge
* refactor: fix headers with IWYUdundargoc2023-11-28
|
* refactor: rename types.h to types_defs.hdundargoc2023-11-27
|
* build(IWYU): fix includes for undo_defs.hdundargoc2023-11-27
|
* build(IWYU): fix includes for func_attr.hdundargoc2023-11-27
|
* refactor: move Arena and ArenaMem to memory_defs.h (#26240)zeertzjq2023-11-27
|
* refactor: follow style guidedundargoc2023-11-19
| | | | | - reduce variable scope - prefer initialization over declaration and assignment
* refactor: follow style guidedundargoc2023-11-13
| | | | | | - reduce variable scope - prefer initialization over declaration and assignment - use bool to represent boolean values
* build: remove PVSdundargoc2023-11-12
| | | | | | | We already have an extensive suite of static analysis tools we use, which causes a fair bit of redundancy as we get duplicate warnings. PVS is also prone to give false warnings which creates a lot of work to identify and disable.
* fix(f_wait): flush UI before blocking (#25962)zeertzjq2023-11-10
|
* refactor: the long goodbyedundargoc2023-11-05
| | | | | | long is 32 bits on windows, while it is 64 bits on other architectures. This makes the type suboptimal for a codebase meant to be cross-platform. Replace it with more appropriate integer types.
* vim-patch:8.1.0822: peeking and flushing output slows down execution (#25629)zeertzjq2023-10-14
| | | | | | | 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
* refactor: the long goodbyedundargoc2023-10-03
| | | | | | long is 32 bits on windows, while it is 64 bits on other architectures. This makes the type suboptimal for a codebase meant to be cross-platform. Replace it with more appropriate integer types.
* refactor: reorganize option header files (#25437)zeertzjq2023-09-30
| | | | | | - Move vimoption_T to option.h - option_defs.h is for option-related types - option_vars.h corresponds to Vim's option.h - option_defs.h and option_vars.h don't include each other
* build(iwyu): add a few more _defs.h mappings (#25435)zeertzjq2023-09-30
|
* refactor: remove longdundargoc2023-09-29
| | | | | long is 32-bits even on 64-bit windows which makes the type suboptimal for a codebase meant to be cross-platform.
* refactor: move some structs out of buffer_defs.h (#24878)zeertzjq2023-08-26
|
* vim-patch:8.1.2053: SafeStateAgain not triggered if callback uses feedkeys()zeertzjq2023-08-21
| | | | | | | | | | | | Problem: SafeStateAgain not triggered if callback uses feedkeys(). Solution: Check for safe state in the input loop. Make log messages easier to find. Add 'S' flag to state(). https://github.com/vim/vim/commit/d103ee78432f9036d243b18dd5aac1263d3b7dc9 Include misc1.c change from patch 8.1.2062. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.1.2046: SafeState may be triggered at the wrong momentzeertzjq2023-08-21
| | | | | | | | | | | | | Problem: SafeState may be triggered at the wrong moment. Solution: Move it up higher to after where messages are processed. Add a SafeStateAgain event to tigger there. https://github.com/vim/vim/commit/69198cb8c08f124729c41a4681f2d142228a9139 SafeStateAgain is N/A. Move SafeState functions to state.c. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.1694: wrong mapping applied when replaying a char search (#24670)zeertzjq2023-08-12
| | | | | | | | | Problem: wrong mapping applied when replaying a char search Solution: Store a NOP after the ESC closes: vim/vim#12708 closes: vim/vim#6350 https://github.com/vim/vim/commit/bacc83009bc38c9ba0247aaa22b76d1993d57993
* fix(redo): make redo of Lua mappings in op-pending mode work (#23566)zeertzjq2023-05-10
|
* vim-patch:9.0.1521: failing redo of command with control characterszeertzjq2023-05-08
| | | | | | | Problem: Failing redo of command with control characters. Solution: Use AppendToRedobuffLit() for colon commands. (closes vim/vim#12354) https://github.com/vim/vim/commit/30b6d6104c3d541c41c868989c020b743e01af08
* vim-patch:9.0.1516: cannot use special keys in <Cmd> mappingzeertzjq2023-05-08
| | | | | | | | Problem: Cannot use special keys in <Cmd> mapping. Solution: Do allow for special keys in <Cmd> and <ScriptCmd> mappings. (closes vim/vim#12326) https://github.com/vim/vim/commit/3ab3a864814f903da8a158c01820e4fbe1013c08
* vim-patch:8.2.3887: E1135 is used for two different errorszeertzjq2023-05-08
| | | | | | | | | Problem: E1135 is used for two different errors. Solution: Renumber one error. https://github.com/vim/vim/commit/806da5176e9e9ab011d927c4ca33a8dde1769539 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.2062: <Cmd> does not handle CTRL-Vzeertzjq2023-05-08
| | | | | | | | | Problem: <Cmd> does not handle CTRL-V. Solution: Call get_literal() after encountering CTRL-V. (closes vim/vim#7387) https://github.com/vim/vim/commit/4a44120e3dc1d40dd7109658afd5e078360b1d8f Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.1978: making a mapping work in all modes is complicatedzeertzjq2023-05-08
| | | | | | | | | | | | | Problem: Making a mapping work in all modes is complicated. Solution: Add the <Cmd> special key. (Yegappan Lakshmanan, closes vim/vim#7282, closes 4784, based on patch by Bjorn Linse) https://github.com/vim/vim/commit/957cf67d50516ba98716f59c9e1cb6412ec1535d Change docs to match Vim if it's wording is better. Change error numbers to match Vim. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0904: various comment and indent flaws (#23498)zeertzjq2023-05-06
| | | | | | | | | | | Problem: Various comment and indent flaws. Solution: Improve comments and indenting. https://github.com/vim/vim/commit/88456cd3c49a3dd1fda17cf350daa9b8216b1aa6 Omit test_function_lists.vim change as that file is likely not applicable to Nvim due to the existence of Nvim-only functions. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.4890: inconsistent capitalization in error messageszeertzjq2023-05-05
| | | | | | | | | Problem: Inconsistent capitalization in error messages. Solution: Make capitalization consistent. (Doug Kearns) https://github.com/vim/vim/commit/cf030578b26460643dca4a40e7f2e3bc19c749aa Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor: uncrustifydundargoc2023-04-26
| | | | Notable changes: replace all infinite loops to `while(true)` and remove `int` from `unsigned int`.
* vim-patch:9.0.1479: small source file problems; outdated list of distrib. ↵zeertzjq2023-04-23
| | | | | | | | | | files (#23272) Problem: Small source file problems; outdated list of distributed files. Solution: Small updates to source files and list of distributed files. https://github.com/vim/vim/commit/f39d9e9dca443e42920066be3a98fd9780e4ed33 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor: remove redundant castsii142023-04-07
|
* refactor: remove redundant castsii142023-04-07
|
* refactor(screen): screen.c delenda estbfredl2023-03-14
| | | | | | | | | | | | | drawscreen.c vs screen.c makes absolutely no sense. The screen exists only to draw upon it, therefore helper functions are distributed randomly between screen.c and the file that does the redrawing. In addition screen.c does a lot of drawing on the screen. It made more sense for vim/vim as our grid.c is their screen.c Not sure if we want to dump all the code for option chars into optionstr.c, so keep these in a optionchar.c for now.
* feat(options)!: deprecate paste, remove pastetoggle (#22647)ii142023-03-13
| | | | | we cannot remove 'paste'. It is very common in plugins and configs. 'pastetoggle' can and should be removed though, it's a total waste of everyone's time because it generates bug reports and doesn't work well, and is useless because bracketed-paste works better.
* vim-patch:9.0.1392: using NULL pointer with nested :open command (#22583)zeertzjq2023-03-09
| | | | | | | | Problem: Using NULL pointer with nested :open command. Solution: Check that ccline.cmdbuff is not NULL. https://github.com/vim/vim/commit/7ac5023a5f1a37baafbe1043645f97ba3443d9f6 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor(getchar.c): change most char_u to uint8_t (#22444)zeertzjq2023-02-28
|
* refactor: reduce scope of locals as per the style guide 3 (#22221)dundargoc2023-02-12
| | | refactor: reduce scope of locals as per the style guide
* refactor: replace char_u with char (#21901)dundargoc2023-02-11
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* build: enable MSVC level 3 warnings (#21934)dundargoc2023-02-11
| | | | | | MSVC has 4 different warning levels: 1 (severe), 2 (significant), 3 (production quality) and 4 (informational). Enabling level 3 warnings mostly revealed conversion problems, similar to GCC/clang -Wconversion flag.
* refactor: reduce scope of locals as per the style guide (#22206)dundargoc2023-02-11
|
* refactor(ui): remove some superfluous ui_flush() callsbfredl2023-02-09
| | | | | | | | - <expr> mapping has no business saving and restoring the low-level UI cursor. The cursor will be put in a reasonable position after input is processed, chill out. - TUI handles output needed for suspend - vgetc() family of function does flushing
* vim-patch:8.1.1827: allocating more memory than needed for extended structs ↵zeertzjq2023-02-01
| | | | | | | | | (#22081) Problem: Allocating more memory than needed for extended structs. Solution: Use offsetof() instead of sizeof(). (Dominique Pelle, closes vim/vim#4786) https://github.com/vim/vim/commit/47ed553fd5bebfc36eb8aa81686eeaa5a84eccac
* vim-patch:9.0.1244: cursor displayed in wrong position when leaving Insert ↵zeertzjq2023-01-26
| | | | | | | | | | | | mode (#21996) 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 vim/vim#11877) https://github.com/vim/vim/commit/0f843ef091eceb470caece1d90fdfe08926fe076 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix: use correct number for INT_MAX (#21951)dundargoc2023-01-23
| | | | Actually use INT_MAX rather than a number to prevent these types of situations to begin with.
* refactor: use uint8_t for blobs and ga_append() (#21916)zeertzjq2023-01-21
| | | | | | A blob is used as a sequence of bytes and usually accessed individually, not as as a NUL-terminuated string, so uint8_t should be better. Not sure about ga_append(), but using uint8_t leads to fewer casts.
* refactor: replace char_u with char 25 (#21838)dundargoc2023-01-19
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 22 (#21786)dundargoc2023-01-17
| | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 18 (#21237)dundargoc2023-01-09
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 17 - remove STRLCPY (#21235)dundargoc2023-01-09
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* vim-patch:9.0.1158: code is indented more than necessary (#21697)zeertzjq2023-01-09
| | | | | | | | | | | Problem: Code is indented more than necessary. Solution: Use an early return where it makes sense. (Yegappan Lakshmanan, closes vim/vim#11787) https://github.com/vim/vim/commit/7f8b2559a30e2e2a443c35b28e94c6b45ba7ae04 Omit reset_last_used_map(): only used in Vim9 script. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* vim-patch:8.2.4139: using freed memory in expression abbreviation (#21522)zeertzjq2022-12-24
| | | | | | | | | Problem: Using freed memory if an expression abbreviation deletes the abbreviation. Solution: Do not access the pointer after evaluating the expression. https://github.com/vim/vim/commit/94075b2b0e8e3b75334799d2c082497fbf85ffa1 Co-authored-by: Bram Moolenaar <Bram@vim.org>