aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_buffer.vim
Commit message (Collapse)AuthorAge
* vim-patch:9.2.0882: :bwipe crashes if WinLeave wipes all other buffers (#41082)zeertzjq2026-07-31
| | | | | | | | | | Problem: :bwipe crashes if WinLeave wipes all other buffers (after 9.1.2068). Solution: Check for NULL pointer. related: neovim/neovim#41066 closes: vim/vim#20888 https://github.com/vim/vim/commit/3e4019a082701f48bb44de0cc7a92f6a3077bd4e
* vim-patch:9.2.0676: MS-Windows: cannot switch to a buffer with '%' in its ↵zeertzjq2026-06-19
| | | | | | | | | | | | | | | | | | | | name (#40315) Problem: On MS-Windows it is not possible to switch to a buffer by name with ":b" (including via command-line completion) when the buffer name contains '%'. Solution: Do not escape '%' and '#' for the ":buffer" command on MS-Windows. Since ":buffer" has no EX_XFILE these are not expanded, and escaping them as "\%"/"\#" makes buffer name matching fail when '%'/'#' is in 'isfname' (the backslash is treated as a path separator). fixes: vim/vim#20529 closes: vim/vim#20548 https://github.com/vim/vim/commit/1a96e07bf6ba46f4b6f50a861d755d0fbc89dabb Co-authored-by: Hirohito Higashi <h.east.727@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* vim-patch:9.2.0443: GUI: cancelling save dialog overwrites or discards ↵zeertzjq2026-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | unnamed buffer (#39617) Problem: When closing gvim with an unsaved unnamed buffer, choosing "Yes" in the "Save changes?" dialog and then "Cancel" in the file selection dialog either silently writes the buffer to a file named "Untitled" (overwriting any existing file with that name) or discards the buffer altogether (vibs29, after v9.1.0265). Solution: In dialog_changed(), if browse_save_fname() leaves the buffer without a file name, treat it as a cancel and return without saving. Also stop clearing the modified flag in the restore path on write failure, so the unsaved changes are kept and the caller (e.g. gui_shell_closed()) can also cancel the close. Pre-fill the file dialog with "Untitled" to match the preceding "Save changes to ..." prompt. Add a test for the write-failure path (Hirohito Higashi). fixes: vim/vim#20132 closes: vim/vim#20143 https://github.com/vim/vim/commit/cf947e7ef09fc8a63f447b54b107585b8f3b7abe Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
* vim-patch:9.1.2136: :tab sbuffer may close old tabpage (#37765)zeertzjq2026-02-07
| | | | | | | | | | | Problem: :tab sbuffer may close old tabpage if BufLeave autocommand splits window (after 9.1.0143). Solution: Only close other windows if the buffer will be unloaded (zeertzjq). related: neovim/neovim#37749 closes: vim/vim#19352 https://github.com/vim/vim/commit/6da9f757c48ce87df381d726b165bed6fa301423
* vim-patch:9.1.2068: :bd/bw may try to switch to a closing bufferSean Dewar2026-01-08
| | | | | | | | | | | | Problem: :bdelete/bunload/bwipeout may attempt to switch to a closing buffer, which fails. (after 9.1.2058) Solution: don't consider switching to closing buffers (Sean Dewar) closes: vim/vim#19107 https://github.com/vim/vim/commit/63d53de72d94b53172070acb2b1c50489d1133bd Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
* vim-patch:9.1.2058: b_locked_split is not checked for :sbufferSean Dewar2026-01-08
| | | | | | | | | | | | | | | Problem: b_locked_split is not checked for :sbuffer, which allows autocommands to leave windows open to freed buffers. Solution: In do_buffer_ext, check just before possibly splitting, after handling 'switchbuf'. Leave win_split to handle the check for curbuf. (needed even if curbuf is not the target, as setting the buffer after splitting may fail) (Sean Dewar) closes: vim/vim#19096 https://github.com/vim/vim/commit/ac5c8ab6cc655f42f61f690058be8483fae71d4a Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
* vim-patch:9.1.1974: tests: missing cleanup in Test_bwipe_during_save()zeertzjq2025-12-12
| | | | | | | | | Problem: tests: missing cleanup in Test_bwipe_during_save(). Solution: Reset &charconvert. closes: vim/vim#18908 https://github.com/vim/vim/commit/353103e59afddbfae8432e715217b809e8e15998
* vim-patch:9.1.1971: Crash when buffer gets deleted inside charconvert during ↵zeertzjq2025-12-12
| | | | | | | | | | | | | | save Problem: Crash when buffer gets deleted inside charconvert during save Solution: Check for `b_saving` inside `can_unload_buffer()`, so we don’t try to unload a buffer while it’s still being saved (glepnir). closes: vim/vim#18901 https://github.com/vim/vim/commit/fe1c57cd2caa7de2ce23557646d6c62a9a1b4f92 Co-authored-by: glepnir <glephunter@gmail.com>
* refactor(path)!: support RFC3986 in path_with_url() #36564Chip Senkbeil2025-11-15
| | | | | | | | | | | | | | | Problem: Nvim does not recognize URI scheme with numeric characters. While rare, there are URIs that contain numbers (e.g. [ed2k://](https://en.wikipedia.org/wiki/Ed2k_URI_scheme)) and characters like `+` (e.g. `svn+ssh`). I use it in [distant.nvim](https://github.com/chipsenkbeil/distant.nvim) to support multiple, distinct connections using `distant+1234://` as the scheme. Otherwise, if you open a file with the same name & path on two different machines from the same Nvim instance, their buffer names will conflict when just using `distant://`. Solution: Adds full support for detecting URI scheme per [RFC3986](https://www.rfc-editor.org/rfc/rfc3986#section-3.1)
* vim-patch:9.1.1885: Wrong restored cursor pos when re-entering buffer after ↵zeertzjq2025-10-29
| | | | | | | | | | | | | | changes Problem: Wrong restored cursor position when re-entering a buffer previously viewed in a window after making changes to the same buffer in another window. Solution: Adjust per-window "last cursor" positions on buffer changes. (zeertzjq) closes: vim/vim#18655 https://github.com/vim/vim/commit/b2e6b328dafe1cdfff10f1e811355e514da8071d
* vim-patch:9.1.1601: Patch v8.1.0425 was wrongzeertzjq2025-08-08
| | | | | | | | | | | | | | | | | Problem: Patch v8.1.0425 was wrong Solution: Revert that patch (Hirohito Higashi) This is because the root cause was fixed in 8.1.0786 and a regression occurred elsewhere. related: vim/vim#3455 related: vim/vim#3830 fixes: vim/vim#11558 closes: vim/vim#17899 https://github.com/vim/vim/commit/6abe5e490470d339f5e9a07a478f839cebf23812 Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
* vim-patch:9.1.1599: :bnext doesn't go to unlisted help buffers (#35216)zeertzjq2025-08-07
| | | | | | | | | | | | | | | | | | | | | Problem: :bnext doesn't go to unlisted help buffers when cycling through help buffers (after 9.1.0557). Solution: Don't check if a help buffer is listed (zeertzjq). From <https://github.com/vim/vim/issues/4478#issuecomment-498831057>: > I think we should fix that, since once you get to a non-help buffer > all unlisted buffers are skipped, thus you won't encounter another > help buffer. This implies that cycling through help buffers should work even if help buffers are unlisted. Otherwise this part of :bnext isn't really useful, as :h makes help buffers unlisted by default. related: vim/vim#4478 related: vim/vim#15198 closes: vim/vim#17913 https://github.com/vim/vim/commit/9662f334801597baa3c8d809834794b7a1986a17
* vim-patch:9.1.1361: [security]: possible use-after-free when closing a ↵Sean Dewar2025-05-04
| | | | | | | | | | | | | | | | | buffer (#33820) Problem: [security]: Possible to open more windows into a closing buffer without splitting, bypassing existing "b_locked_split" checks and triggering use-after-free Solution: Disallow switching to a closing buffer. Editing a closing buffer (via ":edit", etc.) was fixed in v9.1.0764, but add an error message and check just "b_locked_split", as "b_locked" is necessary only when the buffer shouldn't be wiped, and may be set for buffers that are in-use but not actually closing. (Sean Dewar) closes: vim/vim#17246 https://github.com/vim/vim/commit/6cb1c828406dcbb9b67ee788501b94f3a0bac88a
* vim-patch:9.1.0557: moving in the buffer list doesn't work as documented ↵zeertzjq2024-07-11
| | | | | | | | | | | | | | | | | | | (#29653) Problem: moving in the buffer list doesn't work as documented (SenileFelineS) Solution: Skip non-help buffers, when run from normal buffers, else only move from help buffers to the next help buffer (LemonBoy) As explained in the help section for :bnext and :bprev the commands should jump from help buffers to help buffers (and from regular ones to regular ones). fixes: vim/vim#4478 closes: vim/vim#15198 https://github.com/vim/vim/commit/893eeeb44583ca33276e263165b2a6e50fd297d0 Co-authored-by: LemonBoy <thatlemon@gmail.com>
* vim-patch:9.1.0265: console dialog cannot save unnamed buffers (#28185)zeertzjq2024-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: console dialog cannot save unnamed buffers Solution: set bufname before save (glepnir). Define dialog_con_gui to test for GUI+Console dialog support, use it to skip the test when the GUI feature has been defined. Note: The dialog_changed() function will also try to call the browse_save_fname() function, when FEAT_BROWSE is defined (which is only defined in a GUI build of Vim). This will eventually lead to a call of do_browse(), which causes an error message if a GUI is not currently running (see the TODO: in do_browse()) and will then lead to a failure in Test_goto_buf_with_onfirm(). Therefore, we must disable the Test_goto_buf_with_onfirm(), when the dialog_con_gui feature is enabled (which basically means dialog feature for GUI and Console builds, in contrast to the dialog_con and dialog_gui feature). (Previously this wasn't a problem, because the test aborted in the YES case for the :confirm :b XgotoConf case and did therefore not run into the browse function call) closes: vim/vim#14398 https://github.com/vim/vim/commit/df46115fc839c8912ed60646e86a412e5180ba1d Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:8.1.0815: dialog for file changed outside of Vim not tested (#28184)zeertzjq2024-04-05
| | | | | | | | | Problem: Dialog for file changed outside of Vim not tested. Solution: Add a test. Move FileChangedShell test. Add 'L' flag to feedkeys(). https://github.com/vim/vim/commit/5e66b42aae7c67a3ef67617d4bd43052ac2b73ce Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.1.0220: Few typos in source and test files (#28076)zeertzjq2024-03-28
| | | | | | | | Problem: Typos in code and tests. Solution: Fix typos (zeertzjq). closes: vim/vim#14321 https://github.com/vim/vim/commit/c029c131ea7822514d67edb9be2de76d076aa267
* vim-patch:9.0.0336: tests are flaky because of using a common file namezeertzjq2023-11-13
| | | | | | | | | | | | | Problem: Tests are flaky because of using a common file name. Solution: Rename files and directories to be more unique. https://github.com/vim/vim/commit/61abe7d8f827ec31f098e8abcdf58846b956ef16 Cherry-pick Test_custom_complete_autoload() from patch 8.2.4584. Cherry-pick test_delete.vim & test_edit.vim changes from patch 9.0.0323. Cherry-pick test_edit.vim changes from patch 8.2.3637. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0415: on MS-Windows some tests are flakyzeertzjq2023-08-22
| | | | | | | | | | Problem: On MS-Windows some tests are flaky. Solution: Add sleeps, disable swapfile, mark test as flaky. (Ken Takata, closes vim/vim#11082) https://github.com/vim/vim/commit/0500e87eba7b2a82392dbb5d573de19f8ff138e7 Co-authored-by: K.Takata <kentkt@csc.jp>
* vim-patch:9.0.0391: using separate delete() call instead of writefile() 'D' flagzeertzjq2023-08-22
| | | | | | | | | Problem: Using separate delete() call instead of writefile() 'D' flag. Solution: Use the writefile 'D' flag. https://github.com/vim/vim/commit/3411265a3698c3d5ef56d9b0c3bb237a9f5fdba1 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0313: using common name in tests leads to flaky testszeertzjq2023-08-21
| | | | | | | | | Problem: Using common name in tests leads to flaky tests. Solution: Rename files and directories to be more specific. https://github.com/vim/vim/commit/e7cda97b6b578b33a42de0d27ac2876337c641ca Co-authored-by: Bram Moolenaar <Bram@vim.org>
* test: move oldtests to test directory (#22536)dundargoc2023-03-07
The new oldtest directory is in test/old/testdir. The reason for this is that many tests have hardcoded the parent directory name to be 'testdir'.