@@ -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()
@@ -7382,8 +7392,7 @@ fun! s:NetrwMarkFileDiff(islocal)
73827392 exe "NetrwKeepj e ".fnameescape(fname)
73837393 diffthis
73847394 elseif cnt == 2 || cnt == 3
7385- vsplit
7386- wincmd l
7395+ below vsplit
73877396" call Decho("diffthis: ".fname,'~'.expand("<slnum>"))
73887397 exe "NetrwKeepj e ".fnameescape(fname)
73897398 diffthis
@@ -12044,9 +12053,9 @@ fun! s:NetrwBufRemover(bufid)
1204412053" call Decho("buf#".a:bufid." has name <".bufname(a:bufid).">","~".expand("<slnum>"))
1204512054" call Decho("buf#".a:bufid." has winid#".bufwinid(a:bufid),"~".expand("<slnum>"))
1204612055
12047- if a:bufid > 1 && !buflisted(a:bufid) && bufname(a:bufid) == "" && bufwinid(a:bufid) == -1
12056+ if a:bufid > 1 && !buflisted(a:bufid) && bufloaded(a:bufid) && bufname(a:bufid) == "" && bufwinid(a:bufid) == -1
1204812057" call Decho("(s:NetrwBufRemover) removing buffer#".a:bufid,"~".expand("<slnum>"))
12049- exe "bd! ".a:bufid
12058+ exe "sil! bd! ".a:bufid
1205012059 endif
1205112060
1205212061" call Dret("s:NetrwBufRemover")
0 commit comments