summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_cmdwin.vim
AgeCommit message (Collapse)Author
2024-01-23patch 9.1.0049: Make "[Command Line]" a special buffer namev9.1.0049Sean Dewar
Problem: E95 is possible if a buffer called "[Command Line]" already exists when opening the cmdwin. This can also happen if the cmdwin's buffer could not be deleted when closing. Solution: Un-name the cmdwin buffer, and give it a special name instead, similar to what's done for quickfix buffers and for unnamed prompt and scratch buffers. As a result, BufFilePre/Post are no longer fired when opening the cmdwin. Add a "command" key to the dictionary returned by getbufinfo() to differentiate the cmdwin buffer instead. (Sean Dewar) NOTE: This is technically a breaking change... maybe this needs a different solution? (Or maybe this issue can be ignored...) A GitHub search reveals some plugins expect the old behaviour. However, many of those plugins also do not seem to account for the string being translated, so they are subtly broken anyway (not withstanding the fact that you can call any old buffer "[Command Line]" too...) closes: #12819 Signed-off-by: Sean Dewar <seandewar@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23patch 9.1.0048: Abort opening cmdwin if autocmds screw things upv9.1.0048Sean Dewar
Problem: Autocmds triggered from opening the cmdwin (in win_split and do_ecmd) can cause issues such as E199, as the current checks are insufficient. Solution: Commands executed from the cmdwin apply to the old curwin/buf, so they should be kept in a "suspended" state; abort if they've changed. Also abort if cmdwin/buf was tampered with, and check that curwin is correct. Try to clean up the cmdwin buffer (only if hidden and non-current to simplify things; the same approach is used when closing cmdwin normally), and add a beep. (Sean Dewar) It'd be nice to also check that curwin was *really* created by win_split, as autocommands can change curwin before it returns (so it can't be assumed to be that of the split); for now, this means that the cmdwin may not be the botwin in that case, which is probably OK. closes: #12819 Signed-off-by: Sean Dewar <seandewar@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23patch 9.1.0047: issues with temp curwin/buf while cmdwin is openv9.1.0047Sean Dewar
Problem: Things that temporarily change/restore curwin/buf (e.g: win_execute, some autocmds) may break assumptions that curwin/buf is the cmdwin when "cmdwin_type != 0", causing issues. Solution: Expose the cmdwin's real win/buf and check that instead. Also try to ensure these variables are NULL if "cmdwin_type == 0", allowing them to be used directly in most cases without checking cmdwin_type. (Sean Dewar) Alternatively, we could ban win_execute in the cmdwin and audit all places that temporarily change/restore curwin/buf, but I didn't notice any problems arising from allowing this (standard cmdwin restrictions still apply, so things that may actually break the cmdwin are still forbidden). closes: #12819 Signed-off-by: Sean Dewar <seandewar@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-17patch 9.0.1726: incorrect heights in win_size_restore()v9.0.1726Sean Dewar
Problem: incorrect heights in win_size_restore() Solution: avoid restoring incorrect heights in win_size_restore() Changing 'showtabline' or 'cmdheight' in the cmdwin restores incorrect window heights after closing the cmdwin. This may produce a gap between the cmdline and the window above. Solution: restore window sizes only if the number of lines available for windows changed; subtract the rows of the tabline, cmdline and last window's statusline from 'lines' (other statuslines don't matter). closes: #12704 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
2023-05-13patch 9.0.1550: in cmdline window S-Tab does not select previous completionv9.0.1550Bram Moolenaar
Problem: In cmdline window S-Tab does not select previous completion. (Maxim Kim) Solution: Add a mappint for S-Tab. (closes #12116)
2022-10-05patch 9.0.0663: tests check for +cmdwin feature which is always presentv9.0.0663zeertzjq
Problem: Tests check for +cmdwin feature which is always present. Solution: Remove the checks. (closes #11287)
2022-09-26patch 9.0.0598: using negative array index with negative width windowv9.0.0598Bram Moolenaar
Problem: Using negative array index with negative width window. Solution: Make sure the window width does not become negative.
2022-09-18patch 9.0.0500: when quitting cmdline window with CTRL-C it remains visiblev9.0.0500Bram Moolenaar
Problem: When quitting the cmdline window with CTRL-C it remains visible. Solution: Redraw to avoid confusion. Adjust the error message. (closes #11152) Adjust the cursor position after CTRL-C.
2022-09-17patch 9.0.0492: cmdwin test fails on MS-Windowsv9.0.0492Bram Moolenaar
Problem: Cmdwin test fails on MS-Windows. Solution: Skip test on MS-Windows.
2022-09-17patch 9.0.0490: using freed memory with cmdwin and BufEnter autocmdv9.0.0490Bram Moolenaar
Problem: Using freed memory with cmdwin and BufEnter autocmd. Solution: Make sure pointer to b_p_iminsert is still valid.
2022-09-08patch 9.0.0418: manually deleting temp test filesv9.0.0418Bram Moolenaar
Problem: Manually deleting temp test files. Solution: Use the 'D' flag of writefile() and mkdir().
2022-08-23patch 9.0.0249: no test for what 9.0.0234 fixesv9.0.0249Bram Moolenaar
Problem: No test for what 9.0.0234 fixes. Solution: Add a test. (issue #10950)
2022-08-16patch 9.0.0218: reading before the start of the linev9.0.0218Bram Moolenaar
Problem: Reading before the start of the line. Solution: When displaying "$" check the column is not negative.
2022-07-24patch 9.0.0064: confusing error when using "q:" in command line windowv9.0.0064Bram Moolenaar
Problem: Confusing error when using "q:" in command line window. Solution: Check for the situation and give a better error message. (closes #10756)
2022-07-02patch 9.0.0027: the command line test is getting quite bigv9.0.0027Bram Moolenaar
Problem: The command line test is getting quite big. Solution: Move command line window tests to a separate file.