diff options
| author | Juri Linkov | 2025-07-14 09:43:18 +0300 |
|---|---|---|
| committer | Juri Linkov | 2025-07-14 09:43:18 +0300 |
| commit | 817f7829f9cdb47d2bcdee95ffc97830537c490d (patch) | |
| tree | f3d7e09164dc06a695b21a895866538a5a072180 | |
| parent | a8b65860a5e28ee0867e8506a17d74d4a9b7783a (diff) | |
| download | emacs-817f7829f9cdb47d2bcdee95ffc97830537c490d.tar.gz emacs-817f7829f9cdb47d2bcdee95ffc97830537c490d.zip | |
* src/xdisp.c (tab-bar-truncate): New variable (bug#78953).
(tab_bar_height): Use it.
| -rw-r--r-- | etc/NEWS | 5 | ||||
| -rw-r--r-- | src/xdisp.c | 14 |
2 files changed, 18 insertions, 1 deletions
| @@ -398,6 +398,11 @@ normally shown in the echo area or via tooltips. See the variable's | |||
| 398 | docstring for arguments passed to a help-text function. | 398 | docstring for arguments passed to a help-text function. |
| 399 | 399 | ||
| 400 | --- | 400 | --- |
| 401 | *** New variable 'tab-bar-truncate'. | ||
| 402 | When non-nil, it truncates the tab bar, and therefore prevents | ||
| 403 | wrapping and resizing the tab bar to more than one line. | ||
| 404 | |||
| 405 | --- | ||
| 401 | *** New command 'tab-line-move-tab-forward' ('C-x M-<right>'). | 406 | *** New command 'tab-line-move-tab-forward' ('C-x M-<right>'). |
| 402 | Together with the new command 'tab-line-move-tab-backward' | 407 | Together with the new command 'tab-line-move-tab-backward' |
| 403 | ('C-x M-<left>'), it can be used to move the current tab | 408 | ('C-x M-<left>'), it can be used to move the current tab |
diff --git a/src/xdisp.c b/src/xdisp.c index 15a88f0868a..992d162f2e3 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -14739,11 +14739,19 @@ tab_bar_height (struct frame *f, int *n_rows, bool pixelwise) | |||
| 14739 | it.paragraph_embedding = L2R; | 14739 | it.paragraph_embedding = L2R; |
| 14740 | 14740 | ||
| 14741 | clear_glyph_row (temp_row); | 14741 | clear_glyph_row (temp_row); |
| 14742 | while (!ITERATOR_AT_END_P (&it)) | 14742 | if (tab_bar_truncate) |
| 14743 | { | 14743 | { |
| 14744 | it.glyph_row = temp_row; | 14744 | it.glyph_row = temp_row; |
| 14745 | display_tab_bar_line (&it, -1); | 14745 | display_tab_bar_line (&it, -1); |
| 14746 | } | 14746 | } |
| 14747 | else | ||
| 14748 | { | ||
| 14749 | while (!ITERATOR_AT_END_P (&it)) | ||
| 14750 | { | ||
| 14751 | it.glyph_row = temp_row; | ||
| 14752 | display_tab_bar_line (&it, -1); | ||
| 14753 | } | ||
| 14754 | } | ||
| 14747 | clear_glyph_row (temp_row); | 14755 | clear_glyph_row (temp_row); |
| 14748 | 14756 | ||
| 14749 | /* f->n_tab_bar_rows == 0 means "unknown"; -1 means no tab-bar. */ | 14757 | /* f->n_tab_bar_rows == 0 means "unknown"; -1 means no tab-bar. */ |
| @@ -38209,6 +38217,10 @@ window, nil if it's okay to leave the cursor partially-visible. */); | |||
| 38209 | DEFSYM (Qmake_window_start_visible, "make-window-start-visible"); | 38217 | DEFSYM (Qmake_window_start_visible, "make-window-start-visible"); |
| 38210 | Fmake_variable_buffer_local (Qmake_window_start_visible); | 38218 | Fmake_variable_buffer_local (Qmake_window_start_visible); |
| 38211 | 38219 | ||
| 38220 | DEFVAR_BOOL ("tab-bar-truncate", tab_bar_truncate, | ||
| 38221 | doc: /* Non-nil means truncate tab-bar and show only one line. */); | ||
| 38222 | tab_bar_truncate = false; | ||
| 38223 | |||
| 38212 | DEFSYM (Qclose_tab, "close-tab"); | 38224 | DEFSYM (Qclose_tab, "close-tab"); |
| 38213 | DEFVAR_LISP ("tab-bar-border", Vtab_bar_border, | 38225 | DEFVAR_LISP ("tab-bar-border", Vtab_bar_border, |
| 38214 | doc: /* Border below tab-bar in pixels. | 38226 | doc: /* Border below tab-bar in pixels. |