File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1070,12 +1070,14 @@ function FzfWin:create()
10701070 vim .cmd (tostring (self .winopts .split ))
10711071 end
10721072 local split_bufnr = vim .api .nvim_get_current_buf ()
1073- assert (self .src_bufnr ~= split_bufnr , " split function should create a new buffer" )
10741073 self .fzf_winid = vim .api .nvim_get_current_win ()
10751074 if tonumber (self .fzf_bufnr ) and vim .api .nvim_buf_is_valid (self .fzf_bufnr ) then
10761075 -- Set to fzf bufnr set by `:unhide()`, wipe the new split buf
10771076 utils .win_set_buf_noautocmd (self .fzf_winid , self .fzf_bufnr )
10781077 utils .nvim_buf_delete (split_bufnr , { force = true })
1078+ elseif self .src_bufnr == split_bufnr then
1079+ -- "enew" on splash screen doesn't create a new buf
1080+ self .fzf_bufnr = self :set_tmp_buffer (true )
10791081 else
10801082 self .fzf_bufnr = split_bufnr
10811083 end
You can’t perform that action at this time.
0 commit comments