Skip to content

Commit 70e4b80

Browse files
committed
fix: reset latest_cmd on close
1 parent 558a0f1 commit 70e4b80

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/live-command/cmd_executor.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ local differ = require("live-command.differ")
44
local highlighter = require("live-command.highlighter")
55
local logger = require("live-command.logger")
66

7-
---@type string
7+
---@type string?
88
local latest_cmd
99

1010
local running = false
@@ -30,6 +30,7 @@ local setup = function(bufnr)
3030
end
3131

3232
M.teardown = function(do_refetch_lines)
33+
latest_cmd = nil
3334
vim.o.lazyredraw = prev_lazyredraw
3435
refetch_lines = do_refetch_lines
3536
if vim.v.errmsg ~= "" then

0 commit comments

Comments
 (0)