File tree 2 files changed +13
-7
lines changed
neo-tree/sources/filesystem 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()
215
215
end
216
216
217
217
M .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
225
218
-- if it is a neo-tree window, just set local options
226
219
if vim .bo .filetype == " neo-tree" then
227
220
vim .cmd ([[
@@ -240,6 +233,16 @@ M.buffer_enter_event = function(args)
240
233
return
241
234
end
242
235
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
+
243
246
-- For all others, make sure another buffer is not hijacking our window
244
247
local prior_buf = vim .fn .bufnr (" #" )
245
248
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)
111
111
end
112
112
113
113
M .follow = function (callback , force_show )
114
+ if vim .fn .bufname (0 ) == " COMMIT_EDITMSG" then
115
+ return false
116
+ end
114
117
utils .debounce (" neo-tree-follow" , function ()
115
118
return follow_internal (callback , force_show )
116
119
end , 200 , utils .debounce_strategy .CALL_LAST_ONLY )
You can’t perform that action at this time.
0 commit comments