summaryrefslogtreecommitdiffstatshomepage
path: root/test/functional/editor/mode_insert_spec.lua
AgeCommit message (Collapse)AuthorFiles
2025-11-27fix(edit): handle cindent properly with completion (#36711)zeertzjq1
Don't handle cindent in insert_check(). Instead, do that just before returning from insert_execute() if required. This also makes the in_cinkeys() change from #12894 unnecessary.
2025-09-16docs: small fixes (#35791)zeertzjq1
Close #34938 Close #35030 Close #35233 Close #35259 Close #35290 Close #35433 Close #35541 Close #35766 Close #35792 Co-authored-by: huylg <45591413+huylg@users.noreply.github.com> Co-authored-by: Jason Del Ponte <961963+jasdel@users.noreply.github.com> Co-authored-by: sooriya <74165167+thuvasooriya@users.noreply.github.com> Co-authored-by: Andrew Braxton <andrewcbraxton@gmail.com> Co-authored-by: Enric Calabuig <enric.calabuig@gmail.com> Co-authored-by: Augusto César Dias <augusto.c.dias@gmail.com> Co-authored-by: David Sierra DiazGranados <davidsierradz@gmail.com> Co-authored-by: Stepan Nikitin <90522882+vectravox@users.noreply.github.com> Co-authored-by: Emilien Breton <bricktech2000@gmail.com>
2025-09-03docs: lsp, miscJustin M. Keyes1
- Problem: It's not clear for new plugin developers that `:help` uses a help-tags file for searching the docs, generated by `:helptags`. - Solution: Hint to the |:helptags| docs for regenerating the tags file for their freshly written documentation. Co-authored-by: Yochem van Rosmalen <git@yochem.nl>
2025-09-01feat(editor)!: insert-mode ctrl-r should work like paste #35477Shadman1
Problem: insert-mode ctrl-r input is treated like raw user input, which is almost never useful. This means any newlines in the input are affected by autoindent, etc., which is: - slow - usually breaks the formatting of the input Solution: - ctrl-r should be treated like a paste, not user-input. - does not affect `<c-r>=`, so `<c-r>=@x` can still be used to get the old behavior. Co-authored-by: Justin M. Keyes <justinkz@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2024-11-14fix(tests): needing two calls to setup a screen is cringebfredl1
Before calling "attach" a screen object is just a dummy container for (row, col) values whose purpose is to be sent as part of the "attach" function call anyway. Just create the screen in an attached state directly. Keep the complete (row, col, options) config together. It is still completely valid to later detach and re-attach as needed, including to another session.
2024-09-06fix(multibyte): handle backspace of wide clusters in replace modebfredl1
Make utf_head_off more robust against invalid sequences and embedded NUL chars
2024-05-26refactor(tests): more global highlight definitionsbfredl1
2024-04-23test: improve test conventionsdundargoc1
Specifically, functions that are run in the context of the test runner are put in module `test/testutil.lua` while the functions that are run in the context of the test session are put in `test/functional/testnvim.lua`. Closes https://github.com/neovim/neovim/issues/27004.
2024-04-15vim-patch:9.1.0329: String interpolation fails for Dict type (#28335)zeertzjq1
Problem: String interpolation fails for Dict type Solution: Support Dict data type properly, also support :put =Dict (without having to convert it to string() first) (Yegappan Lakshmanan) fixes: vim/vim#14529 closes: vim/vim#14541 https://github.com/vim/vim/commit/f01493c55062c01b1cdf9b1e946577f4d1bdddf3 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2024-04-10refactor(test): inject after_each differentlyLewis Russell1
2024-04-08test: improve test conventionsdundargoc1
Work on https://github.com/neovim/neovim/issues/27004.
2024-03-26fix(edit): backspace adds extra spaces for inline virtual text (#28005)vanaigr1
Problem: Backspace adds extra spaces for inline virtual text. Solution: Ignore virtual text and wrapping when backspacing.
2024-01-03refactor: format test/*Justin M. Keyes1
2023-12-09test: avoid repeated screen lines in expected stateszeertzjq1
This is the command invoked repeatedly to make the changes: :%s/^\(.*\)|\%(\*\(\d\+\)\)\?$\n\1|\%(\*\(\d\+\)\)\?$/\=submatch(1)..'|*'..(max([str2nr(submatch(2)),1])+max([str2nr(submatch(3)),1]))/g
2023-10-13fix(grid): add start column when getting char on line (#25627)zeertzjq1
2023-05-05vim-patch:8.2.3135: Vim9: builtin function arguments not checked at compile timezeertzjq1
Problem: Vim9: builtin function arguments not checked at compile time. Solution: Add more type checks. (Yegappan Lakshmanan, closes vim/vim#8539) https://github.com/vim/vim/commit/5b73992d8f82be7ac4b6f46c17f53ffb9640e5fa Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-03-26vim-patch:9.0.1428: cursor in wrong position when leaving insert mode (#22786)zeertzjq1
Problem: Cursor in wrong position when leaving insert mode. Solution: Update the w_valid flags. Position the cursor also when not redrawing. (closes vim/vim#12137) https://github.com/vim/vim/commit/c174c2e58c9e24a75b189e01143e6d057b84e96e Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-11fix(edit): don't subtract msg_scrolled when removing double quote (#22630)zeertzjq1
With msg_grid there is no need to subtract msg_scrolled.
2022-08-21fix(edit.c): indentkeys double indent after "!" #12894Axel Forsman1
which is both unexpected and different from the Vim behaviour. Indent was triggered once by the '!' check in insert_execute(), and inserting the char was correctly skipped, but then triggered again in insert_check() (provided that cindent was not being ignored after manual indentation, i.e. `can_cindent == true`). While this is the smallest fix, another solution would be to remove VimState#check and instead move that to *_enter()/-_execute(), since the control flow is pretty unnecessarily convoluted as is. That would also have the benefit of differing less from the Vim source code.
2022-05-22refactor!: delete insertmode (#18547)Gregory Anders1
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'
2022-04-29feat(edit): insert an unsimplified key using CTRL-SHIFT-Vzeertzjq1
This marks the following Vim patches as ported: vim-patch:8.1.2333: with modifyOtherKeys CTRL-^ doesn't work Problem: With modifyOtherKeys CTRL-^ doesn't work. Solution: Handle the exception. https://github.com/vim/vim/commit/828ffd596394f714270a01a55fc3f949a8bd9b35 vim-patch:8.1.2350: other text for CTRL-V in Insert mode with modifyOtherKeys Problem: Other text for CTRL-V in Insert mode with modifyOtherKeys. Solution: Convert the Escape sequence back to key as if modifyOtherKeys is not set, and use CTRL-SHIFT-V to get the Escape sequence itself. (closes vim/vim#5254) https://github.com/vim/vim/commit/fc4ea2a72d36de1196a3ce17352e72f8fe90f4bb vim-patch:8.2.2084: CTRL-V U doesn't work to enter a Unicode character Problem: CTRL-V U doesn't work to enter a Unicode character when modifyOtherKeys is effective. (Ken Takata) Solution: Add a flag to get_literal() for the shift key. (closes vim/vim#7413) https://github.com/vim/vim/commit/0684e36a7ee0743f2889698fb8e0e14f7acae423 Omit getcmdkeycmd() change as it depends on Vim patch 8.2.2062, which may introduce a potential breakage.
2022-04-08test: add a test for #16823zeertzjq1
2022-01-25test: add more tests for Insert mode Ctrl-Vzeertzjq1
2021-12-26fix: do not save K_EVENT as lastc in Insert modezeertzjq1
I'm also gonna move some other K_EVENT-related tests to vim_spec.lua
2021-09-17test: reorg #15698Justin M. Keyes1
Problem: Subdirectories like "visual", "insert", "normal" encourage people to separate *related* tests for no good reason. Typically the _mode_ is not the relevant topic of a test (and when it is, _then_ create an appropriate describe() or it()). Solution: - Delete the various `test/functional/<mode>/` subdirectories, move their tests to more meaningful topics. - Rename `…/normal/` to `…/editor/`. - Move or merge `…/visual/*` and `…/insert/*` tests into here where appropriate. - Rename `…/eval/` to `…/vimscript/`. - Move `…/viml/*` into here also. * test(reorg): insert/* => editor/mode_insert_spec.lua * test(reorg): cmdline/* => editor/mode_cmdline_spec.lua * test(reorg): eval core tests => eval_spec.lua