mirror of
https://github.com/zoriya/jj.nvim.git
synced 2026-08-15 07:33:22 +00:00
feat!(terminal): unify terminal window behavior and centralize sizing config (#102)
- add terminal.window.type support (hsplit, vsplit, floating, tab) - add terminal.window.split_size for split-based layouts - rename floating size options to terminal.window.floating_width/floating_height - validate terminal window ratios during setup - make terminal.run/run_floating merge default keymaps internally - remove cmd.split width/height sizing in favor of terminal.window config - improve floating/log buffer state handling and refresh behavior - update README examples and configuration docs BREAKING CHANGE: terminal sizing/config moved to terminal.window.*. Removed cmd.split.width/cmd.split.height. Renamed terminal.window.width/height to terminal.window.floating_width/floating_height
This commit is contained in:
@@ -50,6 +50,10 @@ function M.handle_status_enter()
|
||||
return
|
||||
end
|
||||
|
||||
if require("jj").config.terminal.window.type == "floating" then
|
||||
terminal.close_floating_buffer()
|
||||
end
|
||||
|
||||
local filepath = file_info.new_path
|
||||
local stat = vim.uv.fs_stat(filepath)
|
||||
if not stat then
|
||||
@@ -90,7 +94,7 @@ function M.status(opts)
|
||||
return
|
||||
end
|
||||
|
||||
local cmd_str = "jj st"
|
||||
local cmd_str = "jj status"
|
||||
|
||||
if opts and opts.notify then
|
||||
local output, success = runner.execute_command(cmd_str, "Failed to get status")
|
||||
@@ -99,9 +103,7 @@ function M.status(opts)
|
||||
end
|
||||
else
|
||||
-- Default behavior: show in buffer
|
||||
local cmd = require("jj.cmd")
|
||||
local keymaps = cmd.merge_keymaps(M.status_keymaps(), cmd.terminal_keymaps())
|
||||
terminal.run(cmd_str, keymaps)
|
||||
terminal.run(cmd_str, M.status_keymaps())
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user