diff options
| author | Gregory Heytings | 2022-12-26 00:20:59 +0000 |
|---|---|---|
| committer | Gregory Heytings | 2022-12-26 18:39:41 +0100 |
| commit | b14bbd108e4bc43f8c7995dfff4c2c59c78f1b5f (patch) | |
| tree | ed6d395cc8fffbaa287176b01b81cb69928d6dcf /src | |
| parent | 669160d47b2e3d1eaab242e464c7397cffd6c38b (diff) | |
| download | emacs-b14bbd108e4bc43f8c7995dfff4c2c59c78f1b5f.tar.gz emacs-b14bbd108e4bc43f8c7995dfff4c2c59c78f1b5f.zip | |
Improve handling of tab-bar height.
* src/xdisp.c (redisplay_tab_bar): When 'auto-resize-tab-bar' is
not 'grow-only', also consider the case when the tab-bar height
needs to shrink. Fixes bug#60210.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index ea2d11e8b4e..c9b3b187fe2 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -14271,12 +14271,14 @@ redisplay_tab_bar (struct frame *f) | |||
| 14271 | frame_default_tab_bar_height = new_height; | 14271 | frame_default_tab_bar_height = new_height; |
| 14272 | } | 14272 | } |
| 14273 | 14273 | ||
| 14274 | /* If new_height or new_nrows indicate that we need to enlarge the | 14274 | /* If new_height or new_nrows indicate that we need to enlarge or |
| 14275 | tab-bar window, we can return right away. */ | 14275 | shrink the tab-bar window, we can return right away. */ |
| 14276 | if (new_nrows > f->n_tab_bar_rows | 14276 | if (new_nrows > f->n_tab_bar_rows |
| 14277 | || (EQ (Vauto_resize_tab_bars, Qgrow_only) | 14277 | || (EQ (Vauto_resize_tab_bars, Qgrow_only) |
| 14278 | && !f->minimize_tab_bar_window_p | 14278 | && !f->minimize_tab_bar_window_p |
| 14279 | && new_height > WINDOW_PIXEL_HEIGHT (w))) | 14279 | && new_height > WINDOW_PIXEL_HEIGHT (w)) |
| 14280 | || (! EQ (Vauto_resize_tab_bars, Qgrow_only) | ||
| 14281 | && new_height < WINDOW_PIXEL_HEIGHT (w))) | ||
| 14280 | { | 14282 | { |
| 14281 | if (FRAME_TERMINAL (f)->change_tab_bar_height_hook) | 14283 | if (FRAME_TERMINAL (f)->change_tab_bar_height_hook) |
| 14282 | FRAME_TERMINAL (f)->change_tab_bar_height_hook (f, new_height); | 14284 | FRAME_TERMINAL (f)->change_tab_bar_height_hook (f, new_height); |