mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Turn off scrollbar when pane is in alternate screen, from Michael Grant,
GitHub issue 4231.
This commit is contained in:
10
screen.c
10
screen.c
@ -111,7 +111,7 @@ screen_reinit(struct screen *s)
|
||||
if (options_get_number(global_options, "extended-keys") == 2)
|
||||
s->mode = (s->mode & ~EXTENDED_KEY_MODES)|MODE_KEYS_EXTENDED;
|
||||
|
||||
if (s->saved_grid != NULL)
|
||||
if (SCREEN_IS_ALTERNATE(s))
|
||||
screen_alternate_off(s, NULL, 0);
|
||||
s->saved_cx = UINT_MAX;
|
||||
s->saved_cy = UINT_MAX;
|
||||
@ -147,7 +147,7 @@ screen_free(struct screen *s)
|
||||
if (s->write_list != NULL)
|
||||
screen_write_free_list(s);
|
||||
|
||||
if (s->saved_grid != NULL)
|
||||
if (SCREEN_IS_ALTERNATE(s))
|
||||
grid_destroy(s->saved_grid);
|
||||
grid_destroy(s->grid);
|
||||
|
||||
@ -612,7 +612,7 @@ screen_alternate_on(struct screen *s, struct grid_cell *gc, int cursor)
|
||||
{
|
||||
u_int sx, sy;
|
||||
|
||||
if (s->saved_grid != NULL)
|
||||
if (SCREEN_IS_ALTERNATE(s))
|
||||
return;
|
||||
sx = screen_size_x(s);
|
||||
sy = screen_size_y(s);
|
||||
@ -641,7 +641,7 @@ screen_alternate_off(struct screen *s, struct grid_cell *gc, int cursor)
|
||||
* If the current size is different, temporarily resize to the old size
|
||||
* before copying back.
|
||||
*/
|
||||
if (s->saved_grid != NULL)
|
||||
if (SCREEN_IS_ALTERNATE(s))
|
||||
screen_resize(s, s->saved_grid->sx, s->saved_grid->sy, 0);
|
||||
|
||||
/*
|
||||
@ -656,7 +656,7 @@ screen_alternate_off(struct screen *s, struct grid_cell *gc, int cursor)
|
||||
}
|
||||
|
||||
/* If not in the alternate screen, do nothing more. */
|
||||
if (s->saved_grid == NULL) {
|
||||
if (!SCREEN_IS_ALTERNATE(s)) {
|
||||
if (s->cx > screen_size_x(s) - 1)
|
||||
s->cx = screen_size_x(s) - 1;
|
||||
if (s->cy > screen_size_y(s) - 1)
|
||||
|
Reference in New Issue
Block a user