@@ -131,16 +131,7 @@ function View:create_buffer(bufnr)
131131 globals .BUFNR_PER_TAB [tab ] = bufnr or vim .api .nvim_create_buf (false , false )
132132
133133 if self .explorer .opts .experimental .multi_instance then
134- local tabid = tab
135- self .bufnr_by_tab [tabid ] = globals .BUFNR_PER_TAB [tabid ]
136-
137- log .line (" dev" , " buffer channel attaching t%d b%d" , tabid , self .bufnr_by_tab [tabid ])
138- vim .api .nvim_buf_attach (self .bufnr_by_tab [tabid ], false , {
139- on_detach = function (op , bnr )
140- log .line (" dev" , " buffer channel %s t%d b%d" , op , tabid , bnr )
141- self .bufnr_by_tab [tabid ] = nil
142- end ,
143- })
134+ self .bufnr_by_tab [tab ] = globals .BUFNR_PER_TAB [tab ]
144135 end
145136
146137 vim .api .nvim_buf_set_name (self :get_bufnr (" View:create_buffer1" ), " NvimTree_" .. tab )
@@ -508,18 +499,18 @@ function View:open_in_win(opts)
508499 events ._dispatch_on_tree_open ()
509500end
510501
511- --- @param callsite string
512- function View :abandon_current_window (callsite )
502+ function View :abandon_current_window ()
513503 local tab = vim .api .nvim_get_current_tabpage ()
514504
515505 if self .explorer .opts .experimental .multi_instance then
516- log .line (" dev" , " View:abandon_current_window(%-20.20s) t%d w%s b%s member b%s %s" ,
517- callsite ,
506+ log .line (" dev" , " View:abandon_current_window() t%d w%s b%s member b%s %s" ,
518507 tab ,
519508 globals .TABPAGES [tab ] and globals .TABPAGES [tab ].winnr or nil ,
520509 globals .BUFNR_PER_TAB [tab ],
521510 self .bufnr_by_tab [tab ],
522511 (globals .BUFNR_PER_TAB [tab ] == self .bufnr_by_tab [tab ]) and " " or " MISMATCH" )
512+
513+ self .bufnr_by_tab [tab ] = nil
523514 end
524515
525516 -- TODO multi-instance kill the buffer instead of retaining
0 commit comments