summaryrefslogtreecommitdiffstatshomepage
path: root/test/functional/editor/undo_spec.lua
AgeCommit message (Collapse)AuthorFiles
2026-04-07fix(undo): undefined behavior with empty entry in 'undodir' (#38849)zeertzjq1
Problem: Undefined behavior when 'undodir' contains empty entry. Solution: Don't try to remove trailing slashes from empty path. Also don't remove a colon on Windows while at it.
2026-02-17fix(prompt): clear undo when changing/appending promptSean Dewar1
Problem: undoing after the prompt is changed breaks it (and causes init_prompt to abort it and append a new one), as the undo history contains the old prompt. Solution: like submitting, clear the undo buffer. Don't do it in init_prompt if the line was empty; that may not result in a new prompt, and causes commands like "S" to lose the history. As u_save, etc. wasn't being called by prompt_setprompt, undoing after it fixes the prompt usually gave undesirable results anyway. Remove the added undo_spec.lua test, as its approach no longer works as a repro, and finding a new one seems fiddly.
2026-02-17fix(undo): u_savecommon uses wrong bufferSean Dewar1
Problem: u_savecommon with reload = true wrongly uses curbuf. Solution: use buf. Fix comments.
2025-12-15test: remove feed_command in undo_spec #36953glepnir1
Problem: feed_command is marked as deprecated. Solution: replace it with command and pcall_err.
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-10refactor(test): inject after_each differentlyLewis Russell1
2024-04-08test: improve test conventionsdundargoc1
Work on https://github.com/neovim/neovim/issues/27004.
2024-01-12test: rename (meths, funcs) -> (api, fn)Lewis Russell1
2024-01-03refactor: format test/*Justin M. Keyes1
2022-12-09test(undo_spec): add more tests for writing in Insert modezeertzjq1
2022-12-09vim-patch:9.0.1036: undo misbehaves when writing from an insert mode mappingzeertzjq1
Problem: Undo misbehaves when writing from an insert mode mapping. Solution: Sync undo when writing. (closes vim/vim#11674) https://github.com/vim/vim/commit/3f8f82772313af9f2417b06651f30988b63e1c96 Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-04-20feat: add `undo!`Famiu Haque1
Allows using `undo!` to undo changes and remove them from the undo-tree. Can only be used for moving backwards in the same undo branch.
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