aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/inccommand_spec.lua
Commit message (Collapse)AuthorAge
* fix(inccommand): ignore trailing commands only for *previewed* command #15732Justin M. Keyes2021-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 Co-authored-by: itchyny <itchyny@hatena.ne.jp>
* 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
|/
* inccommand: Ignore leading modifiers in the commandJames McCoy2017-10-24
|
* 'inccommand': fix 'gdefault' lockup #7261KillTheMule2017-09-12
| | | | | closes #7244 ref #7249
* inccommand: fix optimization logic #7224KillTheMule2017-09-09
| | | | | | | Before this change the preview changes in the buffer viewport were limited to the size of the preview window ('cmdwinheight'). closes #7220
* inccommand: improve performance #6949KillTheMule2017-07-08
| | | | | | | | During a preview, we can stop looking for matches after we got enough lines for the preview buffer. Because of this perf improvement, the 'redrawtime' test needs to be slowed down in a different way: _long_ lines instead of just many lines.
* test: inccommand_spec: Avoid indeterminism. (#6592)Justin M. Keyes2017-04-26
|
* test: helpers.execute() => helpers.feed_command()Justin M. Keyes2017-04-11
|
* functests: Replace execute with either command or feed_commandZyX2017-04-09
| | | | | | | | | | Hope this will make people using feed_command less likely: this hides bugs. Already found at least two: 1. msgpackparse() will show internal error: hash_add() in case of duplicate keys, though it will still work correctly. Currently silenced. 2. ttimeoutlen was spelled incorrectly, resulting in option not being set when expected. Test was still functioning somehow though. Currently fixed.
* vim-patch:7.4.2051James McCoy2017-03-06
| | | | | | | Problem: No proper testing of trunc_string(). Solution: Add a unittest for message.c. https://github.com/vim/vim/commit/502ae4ba63561c98ac69af26cd9883bfd18d225f
* undo: :earlier, g-: Set b_u_seq_cur correctly. (#6016)Matthew Malcomson2017-01-31
| | | | | | | | | | | | | | | | | | | Previously alternate branches were not accounted for properly, with this change g- after an undo to a branch point works. The current sequence number b_u_seq_cur is used in undo_time(), in u_doit() this was calculated by subtracting one from the curhead sequence number. The curhead header entry represents the change that was just undone, so the sequence number we want is that of the change we have moved to. This is the sequence number of the undo head that is the uh_next element of this curhead. That sequence number is not always one less than the curhead sequence number -- there may have been an alternate branch at this point. Instead of subtracting one, we now directly find the sequence number of curhead->uh_next.
* inccommand: Preview :sub commands only after the delimiter is presentJames McCoy2017-01-11
| | | | Closes #5888
* inccommand: Suppress error reporting when previewing commandsJames McCoy2017-01-11
| | | | Closes #5912
* build: Target luacheck HEAD.Justin M. Keyes2016-11-17
| | | | | | | | | | | | https://github.com/mpeterv/luacheck/pull/81#issuecomment-261099606 > If you really want to use bleeding-edge version you should get the > rockspec from master branch, not a fixed commit ... > The correct way to install from a specific commit is cloning that > commit and running "luarocks make" from project directory. The reason > is that running "install" or "build" on an scm rockspec fetches > sources from master but uses build description from the rockspec > itself, which may be outdated.
* 'inccommand': Add tests.Justin M. Keyes2016-11-15
|