aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-13 18:58:58 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-14 08:54:00 -0400
commitb946bcbc3b191e11a392af38217876ad1bf50e87 (patch)
tree76a1d42142e0cb97382efef0c4b895631d0747e4
parent01dff1fbfb7aa8afea3ac60da25d47e073c63005 (diff)
downloadrneovim-b946bcbc3b191e11a392af38217876ad1bf50e87.tar.gz
rneovim-b946bcbc3b191e11a392af38217876ad1bf50e87.tar.bz2
rneovim-b946bcbc3b191e11a392af38217876ad1bf50e87.zip
vim-patch:8.2.1842: crash when USE_FNAME_CASE is defined and using :browse
Problem: Crash when USE_FNAME_CASE is defined and using :browse. Solution: Don't use read-only memory for ".". (Yegappan Lakshmanan, closes vim/vim#7123) https://github.com/vim/vim/commit/21cbe175eece17fad21d7403b00422445b587138
-rw-r--r--src/nvim/testdir/test_edit.vim20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_edit.vim b/src/nvim/testdir/test_edit.vim
index d4b1c63741..caebc341e0 100644
--- a/src/nvim/testdir/test_edit.vim
+++ b/src/nvim/testdir/test_edit.vim
@@ -1559,3 +1559,23 @@ func Test_edit_is_a_directory()
call delete(dirname, 'rf')
endfunc
+
+func Test_edit_browse()
+ " in the GUI this opens a file picker, we only test the terminal behavior
+ CheckNotGui
+
+ " ":browse xxx" checks for the FileExplorer augroup and assumes editing "."
+ " works then.
+ augroup FileExplorer
+ au!
+ augroup END
+
+ " When the USE_FNAME_CASE is defined this used to cause a crash.
+ browse enew
+ bwipe!
+
+ browse split
+ bwipe!
+endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab