aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2025-07-14 09:43:18 +0300
committerJuri Linkov2025-07-14 09:43:18 +0300
commit817f7829f9cdb47d2bcdee95ffc97830537c490d (patch)
treef3d7e09164dc06a695b21a895866538a5a072180
parenta8b65860a5e28ee0867e8506a17d74d4a9b7783a (diff)
downloademacs-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/NEWS5
-rw-r--r--src/xdisp.c14
2 files changed, 18 insertions, 1 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 3889cb0e8f1..a81d1105443 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -398,6 +398,11 @@ normally shown in the echo area or via tooltips. See the variable's
398docstring for arguments passed to a help-text function. 398docstring for arguments passed to a help-text function.
399 399
400--- 400---
401*** New variable 'tab-bar-truncate'.
402When non-nil, it truncates the tab bar, and therefore prevents
403wrapping 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>').
402Together with the new command 'tab-line-move-tab-backward' 407Together 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.