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 #7123)
diff --git a/src/testdir/test_edit.vim b/src/testdir/test_edit.vim
index 6607345..ac893f3 100644
--- a/src/testdir/test_edit.vim
+++ b/src/testdir/test_edit.vim
@@ -1805,4 +1805,22 @@
close!
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