File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed
neo-tree/sources/filesystem Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -215,13 +215,6 @@ M.paste_default_config = function()
215215end
216216
217217M .buffer_enter_event = function (args )
218- if utils .is_floating () then
219- return
220- end
221- -- if vim is trying to open a dir, then we hijack it
222- if M .hijack_netrw () then
223- return
224- end
225218 -- if it is a neo-tree window, just set local options
226219 if vim .bo .filetype == " neo-tree" then
227220 vim .cmd ([[
@@ -240,6 +233,16 @@ M.buffer_enter_event = function(args)
240233 return
241234 end
242235
236+ -- there is nothing more we want to do with floating windows
237+ if utils .is_floating () then
238+ return
239+ end
240+
241+ -- if vim is trying to open a dir, then we hijack it
242+ if M .hijack_netrw () then
243+ return
244+ end
245+
243246 -- For all others, make sure another buffer is not hijacking our window
244247 local prior_buf = vim .fn .bufnr (" #" )
245248 if prior_buf < 1 then
Original file line number Diff line number Diff line change @@ -111,6 +111,9 @@ local follow_internal = function(callback, force_show)
111111end
112112
113113M .follow = function (callback , force_show )
114+ if vim .fn .bufname (0 ) == " COMMIT_EDITMSG" then
115+ return false
116+ end
114117 utils .debounce (" neo-tree-follow" , function ()
115118 return follow_internal (callback , force_show )
116119 end , 200 , utils .debounce_strategy .CALL_LAST_ONLY )
You can’t perform that action at this time.
0 commit comments