mirror of
https://github.com/zoriya/jj.nvim.git
synced 2026-08-15 23:53:18 +00:00
fix(terminal): Correctly reset position on floating terminal
This commit is contained in:
@@ -328,9 +328,6 @@ function M.run_floating(cmd, keymaps, float_opts)
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
state.floating_buf = buf
|
state.floating_buf = buf
|
||||||
if state.cursor_restore_pos then
|
|
||||||
M.restore_cursor_position()
|
|
||||||
end
|
|
||||||
|
|
||||||
local jid
|
local jid
|
||||||
local chan
|
local chan
|
||||||
@@ -398,6 +395,10 @@ function M.run_floating(cmd, keymaps, float_opts)
|
|||||||
buffer.set_modifiable(state.floating_buf, false)
|
buffer.set_modifiable(state.floating_buf, false)
|
||||||
end
|
end
|
||||||
buffer.stop_insert(state.floating_buf)
|
buffer.stop_insert(state.floating_buf)
|
||||||
|
-- Restore the cursor position now that the command is done
|
||||||
|
if state.cursor_restore_pos then
|
||||||
|
M.restore_cursor_position()
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user