File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1060,7 +1060,7 @@ end
10601060--- @param state neotree.State
10611061local attach_position_autocmds = function (nt_bufnr , state )
10621062 local autocmd = vim .api .nvim_create_autocmd
1063- local wait_for_save = false
1063+ local wait_for_restore = true
10641064 autocmd (" BufDelete" , {
10651065 buffer = nt_bufnr ,
10661066 callback = function (args )
@@ -1077,12 +1077,12 @@ local attach_position_autocmds = function(nt_bufnr, state)
10771077 return
10781078 end
10791079
1080- if not wait_for_save then
1080+ if not wait_for_restore then
10811081 M .position .save (state , true )
10821082 return
10831083 end
10841084 if M .position .save (state ) then
1085- wait_for_save = false
1085+ wait_for_restore = false
10861086 end
10871087 end ,
10881088 })
@@ -1092,12 +1092,12 @@ local attach_position_autocmds = function(nt_bufnr, state)
10921092 callback = function (args )
10931093 M .position .restore_selection (state )
10941094 if state .bufnr ~= args .buf then
1095- wait_for_save = true
1095+ wait_for_restore = true
10961096 return
10971097 end
10981098
10991099 M .position .restore (state )
1100- wait_for_save = false
1100+ wait_for_restore = false
11011101 end ,
11021102 })
11031103end
You can’t perform that action at this time.
0 commit comments