diff options
author | KSR-Yasuda <31273423+KSR-Yasuda@users.noreply.github.com> | 2023-10-06 03:34:17 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-05 20:34:17 +0200 |
commit | f449825ae23865437a74ea4140fd32780c02ce43 (patch) | |
tree | ec0c3cabfb852c236bab9a9c1c38e10e1d1ab25f /runtime/autoload | |
parent | 9b259f520efa6d5dfa76880dc7623a95be9099ba (diff) |
runtime(netrw): Update `.netrwbook` immediately on bookmark change (#13276)
closes: #9738
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/autoload')
-rw-r--r-- | runtime/autoload/netrw.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index 290a0509bd..e3ac12ffb5 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -3516,6 +3516,11 @@ fun! s:NetrwBookHistHandler(chg,curdir) echo "bookmarked the current directory" endif + try + call s:NetrwBookHistSave() + catch + endtry + elseif a:chg == 1 " change to the bookmarked directory " call Decho("(user: <".v:count."gb>) change to the bookmarked directory",'~'.expand("<slnum>")) @@ -3660,6 +3665,11 @@ fun! s:NetrwBookHistHandler(chg,curdir) " call Decho("g:netrw_bookmarklist=".string(g:netrw_bookmarklist),'~'.expand("<slnum>")) endif " call Decho("resulting g:netrw_bookmarklist=".string(g:netrw_bookmarklist),'~'.expand("<slnum>")) + + try + call s:NetrwBookHistSave() + catch + endtry endif call s:NetrwBookmarkMenu() call s:NetrwTgtMenu() |