runtime(netrw): Update `.netrwbook` immediately on bookmark change (#13276)
Commit: https://github.com/vim/vim/commit/f449825ae23865437a74ea4140fd32780c02ce43 Author: KSR-Yasuda <31273423+ksr-yas...@users.noreply.github.com> Date: Fri Oct 6 03:34:17 2023 +0900 runtime(netrw): Update `.netrwbook` immediately on bookmark change (https://github.com/vim/vim/issues/13276) closes: https://github.com/vim/vim/issues/9738 Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index 290a0509b..e3ac12ffb 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() -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/E1qoTLM-009NRk-Mi%40256bit.org.