Set initial scrollbar state, from Michael Grant.

This commit is contained in:
nicm
2026-07-07 07:47:03 +00:00
parent af35bcb64f
commit 1ea574e4ca
2 changed files with 3 additions and 1 deletions

View File

@@ -459,7 +459,7 @@ key_bindings_init(void)
"bind -Tmove -N 'Move pane to top and resize' 'M-Up' { resizep -x100% -y50%; move-pane -P top-centre }",
"bind -Tmove -N 'Move pane to bottom and resize' 'M-Down' { resizep -x100% -y50%; move-pane -P bottom-centre }",
"bind -Tmove -N 'Move pane to left and resize' 'M-Left' { resizep -x50% -y100%; move-pane -P centre-left }",
"bind -Tmove -N 'Move pane to right and reize' 'M-Right' { resizep -x50% -y100%; move-pane -P centre-right }",
"bind -Tmove -N 'Move pane to right and resize' 'M-Right' { resizep -x50% -y100%; move-pane -P centre-right }",
/* Menu keys */
"bind -N 'Display window menu' < { display-menu -xW -yW -T '#[align=centre]#{window_index}:#{window_name}' " DEFAULT_WINDOW_MENU " }",

View File

@@ -334,6 +334,8 @@ window_create(u_int sx, u_int sy, u_int xpixel, u_int ypixel)
w->ypixel = ypixel;
w->options = options_create(global_w_options);
w->sb = options_get_number(w->options, "pane-scrollbars");
w->sb_pos = options_get_number(w->options, "pane-scrollbars-position");
w->references = 0;
TAILQ_INIT(&w->winlinks);