Skip to content

Commit 082f81e

Browse files
committed
fix(terminal): native terminal window flags
Fix for 2 issues: - Native terminal window is not protected against resize (for example after C-W + = ) - Native terminal window is not protected against buffer change
1 parent 2390c6e commit 082f81e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lua/claudecode/terminal/native.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ local function open_terminal(cmd_string, env_table, effective_config, focus)
8181
vim.cmd("enew")
8282
end)
8383

84+
vim.wo[new_winid].winfixbuf = true
85+
vim.wo[new_winid].winfixwidth = true
86+
8487
-- Shell-aware split + leading-tilde expansion so quoted args and "~/..."
8588
-- paths survive, while no shell touches bracketed model aliases like
8689
-- "opus[1m]" (see utils.parse_command).
@@ -238,6 +241,9 @@ local function show_hidden_terminal(effective_config, focus)
238241
vim.api.nvim_win_set_buf(new_winid, bufnr)
239242
winid = new_winid
240243

244+
vim.wo[winid].winfixbuf = true
245+
vim.wo[winid].winfixwidth = true
246+
241247
if focus then
242248
-- Focus the terminal: switch to terminal window and enter insert mode
243249
vim.api.nvim_set_current_win(winid)

0 commit comments

Comments
 (0)