File tree Expand file tree Collapse file tree 4 files changed +24
-2
lines changed Expand file tree Collapse file tree 4 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -2465,6 +2465,7 @@ do_ecmd(
2465
2465
bufref_T old_curbuf ;
2466
2466
char_u * free_fname = NULL ;
2467
2467
#ifdef FEAT_BROWSE
2468
+ char_u dot_path [] = "." ;
2468
2469
char_u * browse_file = NULL ;
2469
2470
#endif
2470
2471
int retval = FAIL ;
@@ -2511,7 +2512,7 @@ do_ecmd(
2511
2512
// No browsing supported but we do have the file explorer:
2512
2513
// Edit the directory.
2513
2514
if (ffname == NULL || !mch_isdir (ffname ))
2514
- ffname = ( char_u * ) "." ;
2515
+ ffname = dot_path ;
2515
2516
}
2516
2517
else
2517
2518
{
Original file line number Diff line number Diff line change @@ -6084,6 +6084,7 @@ ex_splitview(exarg_T *eap)
6084
6084
char_u * fname = NULL ;
6085
6085
#endif
6086
6086
#ifdef FEAT_BROWSE
6087
+ char_u dot_path [] = "." ;
6087
6088
int browse_flag = cmdmod .browse ;
6088
6089
#endif
6089
6090
int use_tab = eap -> cmdidx == CMD_tabedit
@@ -6136,7 +6137,7 @@ ex_splitview(exarg_T *eap)
6136
6137
// No browsing supported but we do have the file explorer:
6137
6138
// Edit the directory.
6138
6139
if (* eap -> arg == NUL || !mch_isdir (eap -> arg ))
6139
- eap -> arg = ( char_u * ) "." ;
6140
+ eap -> arg = dot_path ;
6140
6141
}
6141
6142
else
6142
6143
{
Original file line number Diff line number Diff line change @@ -1805,4 +1805,22 @@ func Test_edit_lastline_scroll()
1805
1805
close !
1806
1806
endfunc
1807
1807
1808
+ func Test_edit_browse ()
1809
+ " in the GUI this opens a file picker, we only test the terminal behavior
1810
+ CheckNotGui
1811
+
1812
+ " ":browse xxx" checks for the FileExplorer augroup and assumes editing "."
1813
+ " works then.
1814
+ augroup FileExplorer
1815
+ au !
1816
+ augroup END
1817
+
1818
+ " When the USE_FNAME_CASE is defined this used to cause a crash.
1819
+ browse enew
1820
+ bwipe!
1821
+
1822
+ browse split
1823
+ bwipe!
1824
+ endfunc
1825
+
1808
1826
" vim: shiftwidth = 2 sts = 2 expandtab
Original file line number Diff line number Diff line change @@ -750,6 +750,8 @@ static char *(features[]) =
750
750
751
751
static int included_patches [] =
752
752
{ /* Add new patch number below this line */
753
+ /**/
754
+ 1842 ,
753
755
/**/
754
756
1841 ,
755
757
/**/
You can’t perform that action at this time.
0 commit comments