summaryrefslogtreecommitdiffstatshomepage
path: root/src/nvim/input.c
AgeCommit message (Collapse)AuthorFiles
2025-10-14vim-patch:9.1.1853: Ctrl-F and Ctrl-B at more prompt not working with key ↵zeertzjq1
protocol Problem: Ctrl-F and Ctrl-B at more prompt not working with kitty keyboard protocol or modifyOtherKeys (after v9.1.1849). Solution: Call merge_modifyOtherKeys() in get_keystroke() (zeertzjq). closes: vim/vim#18558 https://github.com/vim/vim/commit/6622dc2ded496f9e1484034cd4f53e9ba900026f
2025-08-14refactor(build): remove INCLUDE_GENERATED_DECLARATIONS guardsbfredl1
These are not needed after #35129 but making uncrustify still play nice with them was a bit tricky. Unfortunately `uncrustify --update-config-with-doc` breaks strings with backslashes. This issue has been reported upstream, and in the meanwhile auto-update on every single run has been disabled.
2025-06-09fix(messages): recognize cmdline one_key/number prompt State (#34206)luukvbaal1
Problem: Since 48e2a736, prompt messages are handled by an actual active cmdline, resulting in `State` no longer being equal to `MODE_CONFIRM` which is used in some places. E.g. to specify the current `mode()` or to re-emit a confirm message. Solution: Replace `MODE_CONFIRM` with a new `MODE_CMDLINE` sub-mode when `ccline.one_key/mouse_used` is set. Use it to avoid clearing mouse_used prompt messages, and to re-emit one_key messages (when ext_messages is inactive, for which this is unnecessary).
2025-02-05fix(messages): add a trailing space to inputlist() etc. prompts (#32328)zeertzjq1
Before #31525 the prompts had a trailing space. Also add a test for #7857.
2025-01-02feat(ui)!: emit prompt "messages" as cmdline events #31525luukvbaal1
Problem: Prompts are emitted as messages events, where cmdline events are more appropriate. The user input is also emitted as message events in fast context, so cannot be displayed with vim.ui_attach(). Solution: Prompt for user input through cmdline prompts.
2024-12-23refactor: iwyu #31637Justin M. Keyes1
Result of `make iwyu` (after some "fixups").
2024-11-20fix(messages): more ext_messages kinds #31279luukvbaal1
Add kinds for various commands that output a list, the 'wildmode' list, and for number prompts.
2024-11-13refactor(highlight): make enum of builtin highlights start with 1bfredl1
This makes it possible to use HLF_ values directly as highlight id:s and avoids +1 adjustments especially around messages.
2024-11-08refactor(message): propagate highlight id instead of attrsLuuk van Baal1
Problem: Highlight group id is not propagated to the end of the message call stack, where ext_messages are emitted. Solution: Refactor message functions to pass along highlight group id instead of attr id.
2024-09-10refactor(os/input.c): rename os_inchar => input_get #30327Justin M. Keyes1
Problem: The name `os_inchar` (from Vim's old `mch_inchar`) is ambiguous: "inchar" sounds like it could be reading or enqueuing (setting) input. Its docstring is also ambiguous. Solution: - Rename `os_inchar` to `input_get`. - Write some mf'ing docstrings. - Add assert() in TRY_READ().
2024-04-11vim-patch:9.0.2114: overflow detection not accurate when adding digits (#28271)zeertzjq1
Problem: overflow detection not accurate when adding digits Solution: Use a helper function Use a helper function to better detect overflows before adding integer digits to a long or an integer variable respectively. Signal the overflow to the caller function. closes: vim/vim#13539 https://github.com/vim/vim/commit/22cbc8a4e17ce61aa460c451a26e1bff2c3d2af9 Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-02-06docs: small fixes (#27213)dundargoc1
Co-authored-by: Matthieu Coudron <886074+teto@users.noreply.github.com>
2024-01-11refactor(IWYU): fix headersdundargoc1
Remove `export` pramgas from defs headers as it causes IWYU to believe that the definitions from the defs headers comes from main header, which is not what we really want.
2023-12-30refactor: follow style guidedundargoc1
2023-12-24refactor: follow style guidedundargoc1
2023-12-21refactor: run IWYU on entire repodundargoc1
Reference: https://github.com/neovim/neovim/issues/6371.
2023-12-17refactor: move non-symbols to defs.h headersdundargoc1
2023-11-29refactor: move some constants out of vim_defs.h (#26298)zeertzjq1
2023-11-28refactor: fix headers with IWYUdundargoc1
2023-11-27build(IWYU): fix includes for func_attr.hdundargoc1
2023-11-25build: rework IWYU mapping filesdundargoc1
Create mapping to most of the C spec and some POSIX specific functions. This is more robust than relying files shipped with IWYU.
2023-11-17vim-patch:9.0.2111: [security]: overflow in get_numberzeertzjq1
Problem: [security]: overflow in get_number Solution: Return 0 when the count gets too large [security]: overflow in get_number When using the z= command, we may overflow the count with values larger than MAX_INT. So verify that we do not overflow and in case when an overflow is detected, simply return 0 https://github.com/vim/vim/commit/73b2d3790cad5694fc0ed0db2926e4220c48d968 Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-11-12build: remove PVSdundargoc1
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.
2023-11-05refactor: the long goodbyedundargoc1
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.
2023-09-30build(iwyu): add a few more _defs.h mappings (#25435)zeertzjq1
2023-09-29refactor(message): smsg_attr -> smsgbfredl1
2023-04-26refactor: uncrustifydundargoc1
Notable changes: replace all infinite loops to `while(true)` and remove `int` from `unsigned int`.
2023-02-28refactor(getchar.c): change most char_u to uint8_t (#22444)zeertzjq1
2023-02-11refactor: reduce scope of locals as per the style guide (#22211)dundargoc1
2023-02-11refactor: replace char_u with char (#21901)dundargoc1
refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
2023-01-17vim-patch:8.2.4928: various white space and cosmetic mistakes (#21854)zeertzjq1
Problem: Various white space and cosmetic mistakes. Solution: Change spaces to tabs, improve comments. https://github.com/vim/vim/commit/6ed545e79735f23ff8e650bc2f0967e5a0baedc9 Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-15build: allow IWYU to fix includes for all .c filesdundargoc1
Allow Include What You Use to remove unnecessary includes and only include what is necessary. This helps with reducing compilation times and makes it easier to visualise which dependencies are actually required. Work on https://github.com/neovim/neovim/issues/549, but doesn't close it since this only works fully for .c files and not headers.
2022-09-28fix: compiler warnings from clang 15 (#20321)dundargoc1
Add -Wno-strict-prototypes flag to external dependencies to suppress cjson warnings. These needs to be fixed upstream first.
2022-08-30vim-patch:9.0.0318: clearing screen causes flicker (#19993)zeertzjq1
Problem: Clearing screen causes flicker. Solution: Do not clear but redraw in more cases. Add () to "wait_return". https://github.com/vim/vim/commit/13608d851a0470ced30921428b3313c023d395d8 Only 2 lines of actual code change.
2022-05-10vim-patch:8.2.4911: the mode #defines are not clearly named (#18499)zeertzjq1
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.
2022-05-07refactor: replace char_u variables and functions with charDundar Goc1
Work on https://github.com/neovim/neovim/issues/459
2022-04-29revert: "refactor: Remove allow_keys global (#6346)"zeertzjq1
2022-03-10refactor(uncrustify): format all c filesDundar Göc1
2022-01-21refactor: remove CSI unescaping and clean up related names and commentszeertzjq1
2021-12-10refactor(misc1): move out high-level input functions to a new file: input.cBjörn Linse1
Possibly dialog code is messages.c could be moved here as well. misc1.c is now empty, so delete it.