Skip to content

Commit f449825

Browse files
authored
runtime(netrw): Update .netrwbook immediately on bookmark change (#13276)
closes: #9738 Signed-off-by: Christian Brabandt <[email protected]>
1 parent 9b259f5 commit f449825

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

runtime/autoload/netrw.vim

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3516,6 +3516,11 @@ fun! s:NetrwBookHistHandler(chg,curdir)
35163516
echo "bookmarked the current directory"
35173517
endif
35183518

3519+
try
3520+
call s:NetrwBookHistSave()
3521+
catch
3522+
endtry
3523+
35193524
elseif a:chg == 1
35203525
" change to the bookmarked directory
35213526
" call Decho("(user: <".v:count."gb>) change to the bookmarked directory",'~'.expand("<slnum>"))
@@ -3660,6 +3665,11 @@ fun! s:NetrwBookHistHandler(chg,curdir)
36603665
" call Decho("g:netrw_bookmarklist=".string(g:netrw_bookmarklist),'~'.expand("<slnum>"))
36613666
endif
36623667
" call Decho("resulting g:netrw_bookmarklist=".string(g:netrw_bookmarklist),'~'.expand("<slnum>"))
3668+
3669+
try
3670+
call s:NetrwBookHistSave()
3671+
catch
3672+
endtry
36633673
endif
36643674
call s:NetrwBookmarkMenu()
36653675
call s:NetrwTgtMenu()

0 commit comments

Comments
 (0)