Skip to content

feat: resize editing buffer pane equally, when cc.nvim are open (toggled)#204

Open
nolleh wants to merge 1 commit intocoder:mainfrom
nolleh:feat/resize-editing-buffer-react-cc
Open

feat: resize editing buffer pane equally, when cc.nvim are open (toggled)#204
nolleh wants to merge 1 commit intocoder:mainfrom
nolleh:feat/resize-editing-buffer-react-cc

Conversation

@nolleh
Copy link

@nolleh nolleh commented Mar 5, 2026

Summary

When opening the Claude Code terminal (native provider) with multiple vertical editor panes, Neovim's botright vsplit takes space from only the rightmost pane. This change redistributes width so all editor panes shrink proportionally and sidebars keep their width.

Problem

  • With 2+ vertical editor splits (e.g. nvim-tree + editor1 + editor2), running :ClaudeCode or <leader>ac stole width only from the rightmost editor pane.
  • One editor became very narrow; others unchanged.
  • Same issue when toggling the terminal back on after hiding it.

Solution

  • Before split: Classify windows as sidebars (netrw, NvimTree, neo-tree, oil, minifiles, etc.) or editor panes; save widths.
  • After split: Redistribute remaining space among editor panes by original width ratio. Restore sidebar widths and set terminal to configured width.
  • Applied in both open_terminal (initial open) and show_hidden_terminal (toggle show).

Testing

  • nvim -u fixtures/nvim-tree/init.lua
  • Open nvim-tree, :vsplit twice, then :ClaudeCode → both editor panes shrink proportionally.
  • Toggle hide/show with <leader>ac → layout stays proportional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant