mirror of
https://github.com/TimUntersberger/neogit
synced 2024-09-16 14:24:09 +02:00
Merge pull request #1422 from NeogitOrg/delay-opening
This commit is contained in:
commit
af1d8d88f4
1 changed files with 2 additions and 2 deletions
|
@ -54,7 +54,7 @@ local function translate_cursor_location(self, item)
|
|||
end
|
||||
|
||||
local function open(type, path, cursor)
|
||||
local command = ("silent! %s %s | %s | norm! zz"):format(
|
||||
local command = ("silent! %s %s | %s | redraw! | norm! zz"):format(
|
||||
type,
|
||||
fn.fnameescape(path),
|
||||
cursor and cursor[1] or "1"
|
||||
|
@ -1098,7 +1098,7 @@ M.n_goto_file = function(self)
|
|||
if item and item.absolute_path then
|
||||
local cursor = translate_cursor_location(self, item)
|
||||
self:close()
|
||||
open("edit", item.absolute_path, cursor)
|
||||
vim.schedule_wrap(open)("edit", item.absolute_path, cursor)
|
||||
return
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue