mirror of
https://github.com/zoriya/jj.nvim.git
synced 2026-08-13 14:48:28 +00:00
refactor: remove hardcoded closing keymaps on the terminal buffer
This commit is contained in:
+4
-5
@@ -5,7 +5,6 @@ local utils = require("jj.utils")
|
||||
local runner = require("jj.core.runner")
|
||||
local parser = require("jj.core.parser")
|
||||
local terminal = require("jj.ui.terminal")
|
||||
local editor = require("jj.ui.editor")
|
||||
local diff = require("jj.diff")
|
||||
local log_module = require("jj.cmd.log")
|
||||
local describe_module = require("jj.cmd.describe")
|
||||
@@ -265,7 +264,7 @@ function M.diff(opts)
|
||||
end
|
||||
end
|
||||
|
||||
terminal.run(cmd)
|
||||
terminal.run(cmd, M.close_keymaps())
|
||||
end
|
||||
|
||||
-- Jujutsu rebase
|
||||
@@ -385,13 +384,13 @@ function M.j(args)
|
||||
true
|
||||
)
|
||||
if not success then
|
||||
terminal.run("jj")
|
||||
terminal.run("jj", M.close_keymaps())
|
||||
return
|
||||
end
|
||||
|
||||
local default_cmd = parser.parse_default_cmd(default_cmd_str and default_cmd_str or "")
|
||||
if default_cmd == nil then
|
||||
terminal.run("jj")
|
||||
terminal.run("jj", M.close_keymaps())
|
||||
return
|
||||
end
|
||||
args = default_cmd
|
||||
@@ -449,7 +448,7 @@ function M.j(args)
|
||||
if handlers[subcommand] then
|
||||
handlers[subcommand]()
|
||||
else
|
||||
terminal.run(cmd)
|
||||
terminal.run(cmd, M.close_keymaps())
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user