aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/inccommand_spec.lua
Commit message (Collapse)AuthorAge
* fix(options): do not change inccommand during preview (#25462)Omar El Halabi2023-11-09
|
* fix(move): check the correct buffer (#25698)zeertzjq2023-10-18
|
* 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
* fix(inccommand): don't save information of a buffer twice (#24501)zeertzjq2023-07-28
| | | | | Problem: 'inccommand' doesn't restore 'undolevels' properly for a buffer shown in multiple windows. Solution: Don't save information of a buffer twice.
* fix(inccommand): block errors when parsing command line again (#24374)zeertzjq2023-07-17
| | | Revert the change to ex_getln.c from a741c7fd0465c949a0016fcbee5f4526b65f8c02
* 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>
* fix(excmd): append original command to error messagezeertzjq2023-05-05
| | | | | | | | | | Revert the change to do_cmdline_cmd() from #5226. This function is used in many places, so making it different from Vim leads to small differences from Vim in the behavior of some functions like execute() and assert_fails(). If DOCMD_VERBOSE really needs to be removed somewhere, a do_cmdline() call without DOCMD_VERBOSE is also shorter than a do_cmdline() call with DOCMD_VERBOSE.
* test: fix dependencies between test cases (#23343)zeertzjq2023-04-27
| | | Discovered using --shuffle argument of busted.
* test: make expect_unchanged() less confusing (#22255)zeertzjq2023-02-15
| | | | | | | | Problem: The sleep before collecting the initial screen state is confusing and may lead to unexpected success if it comes after a blocking RPC call. Solution: Remove that sleep and add an "intermediate" argument.
* fix(inccommand): deal with unsynced undo (#20041)zeertzjq2022-09-26
|
* fix(inccommand): avoid unnecessary redraw when not showing (#20244)zeertzjq2022-09-19
|
* fix(tests): remove irrelevant usage of display-=msgsepbfredl2022-08-17
| | | | | | | | These were just added to avoid churn when changing the default of 'display'. To simplify message handling logic, we might want to remove support for printing messages in default_grid later on. This would allow things like printing error messages safely in the middle of redraw, or a future graduation of the 'multigrid' feature.
* vim-patch:8.2.0614: get ml_get error when deleting a line in 'completefunc' ↵zeertzjq2022-07-07
| | | | | | | | | | | | | (#19244) Problem: Get ml_get error when deleting a line in 'completefunc'. (Yegappan Lakshmanan) Solution: Lock the text while evaluating 'completefunc'. https://github.com/vim/vim/commit/ff06f283e3e4b3ec43012dd3b83f8454c98f6639 Fix a mistake in the porting of patch 8.1.0098. Cherry-pick Test_run_excmd_with_text_locked() from patch 8.2.0270. Cherry-pick test_gf.vim changes from patch 8.2.0369. Cherry-pick message change from later patches.
* fix(inccommand): parse the command to check if it is previewableFamiu Haque2022-06-28
| | | | | Free regprog if command isn't previewable Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* refactor(tests): introduce testprg()Justin M. Keyes2022-06-25
| | | | | | Also: - Add a describe('shell :!') section to system_spec. - Make the test for #16271 work on systems without powershell.
* test: correct check for v:errmsg in inccommand test (#18968)zeertzjq2022-06-15
| | | | After the first separator is typed v:errmsg can be set. Check for its value before typing the first separator.
* fix(inccommand): never preview if parsing command failed (#18944)zeertzjq2022-06-14
| | | | `errormsg` is not always set when parsing the command failed (e.g. when the range contains invalid marks). Check the return value is better.
* fix(inccommand): skip split window if not enough room #18937Famiu Haque2022-06-12
| | | | | Command preview now behaves like inccommand=nosplit when there's not enough room for the preview window to be opened instead of aborting, which is consistent with old behavior of 'inccommand'.
* fix(inccommand): clear cmdpreview state if preview is not shown (#18923)zeertzjq2022-06-11
|
* 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.
* test: add tests for inccommand with c_CTRL-R_= and c_CTRL-\_e (#18796)zeertzjq2022-05-29
|
* fix(tests): fix some issues with ui/inccommand_spec.lua causing slownessbfredl2022-05-22
| | | | | | | | from ~30 to ~20 secs with ASAN build - feedkeys test: the same substitute was repeated, and not even correctly spelled - don't clear() in a tight loop. "bwipe!" is enough to erase undo history - error in cnoremap mapping causes a check_for_delay(). <c-c> it away.
* refactor(ui)!: link `VertSplit` to `Normal` by defaultFamiu Haque2022-05-15
| | | | | Avoids using `gui=reverse` on `VertSplit` and makes window separators look much nicer by default.
* fix(inccommand): do not change reg_prev_sub when previewingzeertzjq2022-01-25
|
* fix(inccommand): ignore trailing commands only for *previewed* command #15638itchyny2021-09-20
| | | | | | | | Since the `State` is global, other scripts are unexpectedly affected during the 'inccommand' preview. This commit introduces a new flag for `do_cmdline`, in order to ignore trailing '|'-separated commands only for the command invoking the preview. fix #8796, update #7494
* A Mudholland Dr. RecastBjörn Linse2020-10-19
| | | | | The commit summary maybe does not make sense, but calling a function that does not wait on anything `wait()` makes even less sense.
* extmark: fix decoration ploblems with extmarkerw72020-10-02
| | | | | | 54ce101 changed the way undo entries are created when adding decorations. This creates all sorts of problems.This change fixes the problem by reverting to the previous behavior.
* vim-patch:8.1.0271: 'incsearch' doesn't work for :s, :g or :vAufar Gilbran2020-09-11
| | | | | | Problem: 'incsearch' doesn't work for :s, :g or :v. Solution: Also use 'incsearch' for other commands that use a pattern. https://github.com/vim/vim/commit/b0acacd767a2b0618a7f3c08087708f4329580d0
* extmarks: fix crash due to invalid column values in inccommand previewBjörn Linse2020-02-02
| | | | | This used to use -1 and MAXCOL values. Make sure in range values are used.
* Prevent prompts during inccommand previewsRob Pilling2019-10-31
| | | | For example, "Backwards range given, OK to swap (y/n)?" on each keypress.
* Prevent :topleft, etc modifying the inccommand preview windowRob Pilling2019-10-31
|
* Allow multiple leading colons before and after modifiers for 'inccommand'Rob Pilling2019-10-31
|
* Remove unnecessary expr in 'icm' testRob Pilling2019-10-31
|
* tests/ui: remove unnecessary screen:detach()Björn Linse2019-10-13
| | | | | | | | | | | | | It is perfectly fine and expected to detach from the screen just by the UI disconnecting from nvim or exiting nvim. Just keep detach() in screen_basic_spec, to get some coverage of the detach method itself. This avoids hang on failure in many situations (though one could argue that detach() should be "fast", or at least "as fast as resize", which works in press-return already). Never use detach() just to change the size of the screen, try_resize() method exists for that specifically.
* test: fix screen assertionsJan Edmund Lazo2019-10-01
|
* test/inccommand_spec: avoid indeterminismJustin M. Keyes2019-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use shell-test.c to avoid the squishiness of system shells. - Use screen:expect_unchanged() to avoid hardcoded (brittle) test. Fails correctly if 5020daa6e5ce is reverted (remove terminal_check(), restore redraw() in refresh_timer_cb()): [ ERROR ] test/functional/ui/inccommand_spec.lua @ 2550: :substitute with inccommand during :terminal activity test/functional/helpers.lua:402: retry() attempts: 2 test/functional/ui/screen.lua:579: Row 8 did not match. Expected: |foo bar baz | |bar baz fox | |bar foo baz | |{15:~ }| |{15:~ }| |{15:~ }| |{11:[No Name] [+] }| |*26: xxx | |27: xxx | |28: xxx | |29: xxx | |30: xxx | | | |{10:term }| |:%s/foo/ZZZ^ | Actual: |foo bar baz | |bar baz fox | |bar foo baz | |{15:~ }| |{15:~ }| |{15:~ }| |{11:[No Name] [+] }| |*107: xxx | |108: xxx | |109: xxx | |110: xxx | |111: xxx | | | |{10:term }| |:%s/foo/ZZZ^ |
* ex_getln.c: fix compute_cmdrow() not resetting lines_left (#10749)Ghjuvan Lacambre2019-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, when `inccomand` was set to `nosplit`, multi-line substitutions collapsed the command-line. This happened because when ex_getln.c:cursorcmd() computed a msg_row, it was given a cmdline_row one line too high. This happened because message.c:msg_puts_display() was supposed to decrement cmdline_row but didn't, because of the `msg_no_more && lines_left == 0` check placed just before the decrementation part in msg_puts_display's while loop. Every time msg_puts_display writes a line, it decreases `lines_left` (a variable used to know how many lines are left for prompts). Since redrawcommandline() did not reset `lines_left` between calls to msg_puts_display, every time a character was pressed, `lines_left` was decremented. This meant that once the user pressed COLUMNS+ROWS numbers of characters, `lines_left` would reach 0 and prevent msg_row from being decremented. It makes sense to fix setting `lines_left` to `cmdline_row` in `compute_cmdrow` ; after all, computing where the command line row should be placed is equivalent to computing how many `lines_left` of output there are left. Closes #8254.
* inccommand: Ignore :redraw during previewJustin M. Keyes2019-04-14
| | | | closes #9777
* vim-patch:8.1.0994: fix relative cursor position #9676Justin M. Keyes2019-03-09
| | | | | | Problem: Relative cursor position is not calculated correctly. Solution: Always set topline, also when window is one line only. (Robert Webb) Add more info to getwininfo() for testing. https://github.com/vim/vim/commit/8fcb60f961bdd134599fb016c6537fd496e800f5
* inccommand: auto-disable if folding is slow #9568KillTheMule2019-02-01
| | | | | Fixes #9557
* Mark ":substitute with inccommand during :terminal activity" fragileJames McCoy2019-01-01
|
* test: adjust time-sensitive tests (#9220)Justin M. Keyes2018-11-10
| | | | | | | | | | | | | - window_split_tab_spec.lua: Put cursor at bottom of :terminal buffer so that it follows output. - inccommand_spec.lua: Increase timeout to allow 2nd retry. - Timer tests are less reliable on Travis CI macOS 10.12/10.13. ref #6829 ref e39dade80b02 ref de13113dc16e ref https://github.com/neovim/neovim/pull/9095#issuecomment-429603452 > We don't guarantee that a X ms timer is triggered during Y ms sleep > for any X<Y, though I would expect the load to be really bad for this > to happen with X=10ms, Y=40ms.
* Merge #9124 'vim-patch:8.0.1672'Justin M. Keyes2018-10-17
|\
| * functionaltest: map error does not cancel promptJan Edmund Lazo2018-10-14
| |
* | tests: improve robustness of immediate successes in screen testsBjörn Linse2018-10-15
|/
* tests: introduce screen:expect{...} formBjörn Linse2018-08-27
|
* test: inccommand_spec: retry unreliable test (#8311)Justin M. Keyes2018-05-18
|
* inccommand: pause :terminal redraws (#8307)Justin M. Keyes2018-04-22
| | | fix #5584
* inccommand: do not execute trailing commands #8256Nimit Bhardwaj2018-04-21
| | | | fix #7494
* msg: do not scroll entire screen (#8088)Björn Linse2018-03-31
|