akinsho / akinsho/toggleterm.nvim

Reevalute size on window resize

Đang mở
#609 0 bình luận 3 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Lua
Star
5.6k
Fork
206
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I would like to have a terminal that always uses 40% of the available space.
I have the following config:

```lua
require("toggleterm").setup({
direction = "vertical",
size = function() return vim.o.columns * 0.4 end,
persist_size = false,
})
```

The config allows that, but only between terminal reopens like:

1. Terminal application window in fullscreen
2. Open toggleterm
3. its 40% width
4. Close toggleterm
5. Resize Terminal window
6. Reopen toggleterm
7. its 40% width of the the new Window size
8. This is as I like it

Not working is the following:

## current behavior

1. Terminal application window in fullscreen
2. Open toggleterm
3. its 40% width
4. Resize Terminal window
5. Toggleterm still has 40% width of the **old** window size

## desired behavior

I would like to see that on Window Resize also the size parameter gets reevaluated.

1. Terminal application window in fullscreen
2. Open toggleterm
3. its 40% width
4. Resize Terminal window
5. Toggleterm has 40% width of the **new** window size

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.