fix(terminal): Correctly reset position on floating terminal

This commit is contained in:
NicolasGB
2026-04-07 10:31:35 +02:00
parent 46141a282e
commit cbfcdbbf36
+4 -3
View File
@@ -328,9 +328,6 @@ function M.run_floating(cmd, keymaps, float_opts)
end,
})
state.floating_buf = buf
if state.cursor_restore_pos then
M.restore_cursor_position()
end
local jid
local chan
@@ -398,6 +395,10 @@ function M.run_floating(cmd, keymaps, float_opts)
buffer.set_modifiable(state.floating_buf, false)
end
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,
})