aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/inccommand_user_spec.lua
Commit message (Collapse)AuthorAge
* feat(inccommand): preview 'nomodifiable' buffers #32034Donatas2025-01-20
| | | | | | | | Problem: Incremental preview is not allowed on 'nomodifiable' buffers. Solution: - Allow preview on 'nomodifiable' buffers. - Restore the 'modifiable' option in case the preview function changes it.
* fix(tests): needing two calls to setup a screen is cringebfredl2024-11-14
| | | | | | | | | | 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.
* fix(inccommand): ensure cursor is where it belongsLuuk van Baal2024-11-07
| | | | | Problem: Inccommand preview callback may flush inaccurate cmdline cursor position. Solution: Ensure cursor is where it belongs when doing command preview.
* test: improve test conventionsdundargoc2024-04-23
| | | | | | | | | 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.
* refactor(test): inject after_each differentlyLewis Russell2024-04-10
|
* fix(tests): use more global highlight definitionsbfredl2024-04-09
|
* test: improve test conventionsdundargoc2024-04-08
| | | | Work on https://github.com/neovim/neovim/issues/27004.
* fix(inccommand): improve preview buffer number handling (#27087)zeertzjq2024-01-19
|
* refactor: format test/*Justin M. Keyes2024-01-03
|
* test: avoid repeated screen lines in expected stateszeertzjq2023-12-09
| | | | | | 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
* fix(inccommand): don't set an invalid 'undolevels' value (#24575)zeertzjq2023-08-05
| | | | | | | Problem: Cannot break undo by setting 'undolevels' to itself in 'inccommand' preview callback. Solution: Don't set an invalid 'undolevels' value. Co-authored-by: Michael Henry <drmikehenry@drmikehenry.com>
* test(inccommand): add a test for #20248 (#24489)zeertzjq2023-07-26
|
* fix(inccommand): restrict cmdpreview undo calls (#24289)Alexandre Teoi2023-07-26
| | | | | | | | | | | | | | | Problem: The cmdpreview saved undo nodes on cmdpreview_prepare() from ex_getln.c may become invalid (free) if the preview function makes undo operations, causing heap-use-after-free errors. Solution: Save the buffer undo list on cmdpreview_prepare)_ and start a new empty one. On cmdpreview_restore_state(), undo all the entries in the new undo list and restore the original one. With this approach, the preview function will be allowed to undo only its own changes. Fix #20036 Fix #20248
* fix(substitute): properly check if preview is needed (#23809)zeertzjq2023-05-29
|
* refactor(options): deprecate nvim[_buf|_win]_[gs]et_optionLewis Russell2023-05-21
| | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: famiu <famiuhaque@protonmail.com>
* docs: fix typos (#20394)dundargoc2022-09-30
| | | | | Co-authored-by: Raphael <glephunter@gmail.com> Co-authored-by: smjonas <jonas.strittmatter@gmx.de> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* feat: multibuffer preview support for inccommandFamiu Haque2022-08-19
| | | | | | | | | Allows preview callbacks to modify multiple buffers in order to show the preview. Previously, if multiple buffers were modified, only the current buffer would have its state restored. After this change, all buffers have their state restored after preview. Closes #19103.
* fix(inccommand): avoid crash if callback changes inccommand option (#18830)zeertzjq2022-06-02
| | | | | | | | | clang: Result of operation is garbage or undefined clang: Uninitialized argument value Also check for == 's' instead of != 'n' as it is more straightforward. Also fix another unrelated PVS warning: PVS/V1071: Return value of win_comp_pos() is not always used
* fix(inccommand): do not try to preview an ambiguous command (#18827)zeertzjq2022-06-01
|
* feat: add preview functionality to user commandsFamiu Haque2022-05-31
Adds a Lua-only `preview` flag to user commands which allows the command to be incrementally previewed like `:substitute` when 'inccommand' is set.