aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/inccommand_spec.lua
Commit message (Collapse)AuthorAge
* 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
|
* 'fillchars': fix defaults logic; handle ambiwidth=double #7986Matthieu Coudron2018-02-23
| | | | Update tests.
* test/inccommand_spec: test the test (#7897)Justin M. Keyes2018-01-23
|
* win: enable more functional testsJan Edmund Lazo2018-01-06
| | | | | | - plugin/shada_spec.lua: Use \r\n as Windows EOL for tests on BufWriteCmd, FileWriteCmd, FileAppendCmd. Alternative is 'set fileformat=unix'.
* 'inccommand': Fix matches for zero-width (#7487)KillTheMule2017-11-05
| | | closes #7485
* Merge #7315 "'inccommand': multiline, other fixes"Justin M. Keyes2017-10-31
|\ | | | | | | | | | | | | closes #5589 closes #5590 closes #5598 closes #5608
| * Fix cmd modifier tests for the new highlightKillTheMule2017-10-29
| |
| * Adjust tests for new highlighting.KillTheMule2017-10-29
| | | | | | | | Also extend an old test to show of the new way.
| * Test for clearing the highlightKillTheMule2017-10-29
| |
| * Adjust tests for the new preview windowKillTheMule2017-10-29
| | | | | | | | | | | | | | | | | | ... that does not have that superflous last line. Also, remove some indeterminism for the freebsd64 tests. Partially, those were suggested by the tests themselves, while successfull. Some of them were added after some testing because the lookaround test would fail on freebsd64 only.
| * Move tests into original file, lint, and add a testKillTheMule2017-10-29
| |
| * Fix old inccomand tests, and add more for the new functionality.KillTheMule2017-10-29
|/