aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/prompt_buffer_spec.lua
Commit message (Collapse)AuthorAge
* 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.
* 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
|
* test: improve test conventionsdundargoc2024-04-08
| | | | Work on https://github.com/neovim/neovim/issues/27004.
* refactor(tests): all screen tests should use highlightsbfredl2024-03-23
| | | | | | | | | | | | | | | | | | | | | | | This is the first installment of a multi-PR series significantly refactoring how highlights are being specified. The end goal is to have a base set of 20 ish most common highlights, and then specific files only need to add more groups to that as needed. As a complicating factor, we also want to migrate to the new default color scheme eventually. But by sharing a base set, that future PR will hopefully be a lot smaller since a lot of tests will be migrated just simply by updating the base set in place. As a first step, fix the anti-pattern than Screen defaults to ignoring highlights. Highlights are integral part of the screen state, not something "extra" which we only test "sometimes". For now, we still allow opt-out via the intentionally ugly screen._default_attr_ids = nil The end goal is to get rid of all of these eventually (which will be easier as part of the color scheme migration)
* vim-patch:9.1.0040: issue with prompt buffer and hidden buffer (#27071)zeertzjq2024-01-18
| | | | | | | | | | | | Problem: Modifying a hidden buffer still interferes with prompt buffer mode changes. Solution: Save and restore b_prompt_insert. (zeertzjq) closes: vim/vim#13875 Modifying hidden buffer still interferes with prompt buffer mode changes https://github.com/vim/vim/commit/f267847017976ab85117bdf75b45e769836f8d69
* vim-patch:9.1.0033: Insert mode not stopped if closing prompt buffer ↵zeertzjq2024-01-17
| | | | | | | | | | | | modifies hidden buffer (#27051) Problem: Insert mode not stopped if an autocommand modifies a hidden buffer while closing a prompt buffer. Solution: Don't set b_prompt_insert if stop_insert_mode is already set. (zeertzjq) closes: vim/vim#13872 https://github.com/vim/vim/commit/96958366ad6159efe708b694055320ed19357e61
* test: rename (meths, funcs) -> (api, fn)Lewis Russell2024-01-12
|
* test: typing for helpers.methsLewis Russell2024-01-12
|
* 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
* vim-patch:9.0.1443: ending Insert mode when accessing a hidden prompt buffer ↵zeertzjq2023-04-10
| | | | | | | | | | (#22984) Problem: Ending Insert mode when accessing a hidden prompt buffer. Solution: Don't stop Insert mode when it was active before. (closes vim/vim#12237) https://github.com/vim/vim/commit/05a627c3d4e42a18f76c14828d68ee4747118211 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.1439: start Insert mode when accessing a hidden prompt buffer ↵zeertzjq2023-04-03
| | | | | | | | | | | | | (#22867) Problem: Start Insert mode when accessing a hidden prompt buffer. Solution: Call leaving_window() in aucmd_restbuf(). (Thorben Tröbst, closes vim/vim#12148, closes vim/vim#12147) https://github.com/vim/vim/commit/cde8de034524d00aba4ff4142e658baff511e12d Cherry-pick test_prompt_buffer.vim changes from patch 9.0.0631. Co-authored-by: orbital <orbital@holgerines.de>
* test(legacy/prompt_buffer_spec): align script with oldtest more (#22354)zeertzjq2023-02-21
|
* fix(tests): fix some screen.lua warningsbfredl2022-05-21
|
* vim-patch:8.2.3671: restarting Insert mode in prompt buffer too oftenSean Dewar2021-12-07
| | | | | | | | | | | | | | | Problem: Restarting Insert mode in prompt buffer too often when a callback switches windows and comes back. (Sean Dewar) Solution: Do not set "restart_edit" when already in Insert mode. https://github.com/vim/vim/commit/34c20ff85b87be587ea5d0398812441b502ee6a5 As Test_prompt_switch_windows is skipped, implement it in prompt_buffer_spec. Replace the 50ms term_wait calls with poke_eventloop (test seems to work anyway without them, so maybe they're not required?) The new test does include a duplicate screen test that may generate a "screen test succeeded immediately" warning, but this is done to match the Vim test.
* test(prompt_buffer_spec): include changes from v8.1.1984Sean Dewar2021-12-07
| | | | | | | | I already ported v8.1.1984 previously, but hadn't updated prompt_buffer_spec to match test_prompt_buffer (which we have but due to Vim features such as term_sendkeys it's mostly skipped). Required for v8.2.3671.
* vim-patch:8.2.2014: using CTRL-O in a prompt buffer moves cursor to startSean Dewar2021-12-07
| | | | | | | | Problem: Using CTRL-O in a prompt buffer moves cursor to start of the line. Solution: Do not move the cursor when restarting edit. (closes vim/vim#7330) https://github.com/vim/vim/commit/ee8b787bcd15f63a938243770065e704c9b5c85f Test_prompt_editing is skipped, so edit the Lua test in prompt_buffer_spec.
* vim-patch:8.2.1781: writing to prompt buffer interferes with insert modeSean Dewar2021-12-07
| | | | | | | | | | | Problem: Writing to prompt buffer interferes with insert mode. Solution: Use win_enter() instead of just setting "curwin". (Ben Jackson, closes vim/vim#7035) https://github.com/vim/vim/commit/4537bcc88956f86267c25edf8008e0dbde598652 Vim test will be skipped, so add a Lua test. The problem boils down to the use of aucmd_restbuf in a callback, so just test that (via nvim_buf_set_lines).
* vim-patch:8.1.0092: prompt buffer test failserw72020-02-12
| | | | | | | Problem: Prompt buffer test fails. Solution: Set 'nomodified' before closing the window. (Ozaki Kiichi, closes vim/vim#3051 https://github.com/vim/vim/commit/71ef1ba5e996f34d3e0acbe1d89c4c6bfa5e98ba
* vim-patch:8.1.0036: not restoring Insert mode if leaving prompt buffer with ↵erw72020-02-12
| | | | | | | | | | mouse Problem: Not restoring Insert mode if leaving a prompt buffer by using a mouse click. Solution: Set b_prompt_insert appropriately. Also correct cursor position when moving cursor to last line. https://github.com/vim/vim/commit/891e1fd894720d0b99a9daefa41e8181844f819a
* vim-patch:8.1.0032: BS in prompt buffer starts new lineerw72020-02-12
| | | | | | | Problem: BS in prompt buffer starts new line. Solution: Do not allows BS over the prompt. Make term_sendkeys() handle special keys. Add a test. https://github.com/vim/vim/commit/6b810d92a9cd9378ab46ea0db07079cb789f9faa
* vim-patch:8.1.0027: difficult to make a plugin that feeds a line to a joberw72020-02-12
Problem: Difficult to make a plugin that feeds a line to a job. Solution: Add the nitial code for the "prompt" buftype. https://github.com/vim/vim/commit/f273245f6433d5d43a5671306b520a3230c35787