Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2026-06-08 22:00:07 +01:00
10 changed files with 117 additions and 40 deletions

View File

@@ -672,7 +672,7 @@ screen_reflow(struct screen *s, u_int new_x, u_int *cx, u_int *cy, int cursor)
* Enter alternative screen mode. A copy of the visible screen is saved and the
* history is not updated.
*/
void
int
screen_alternate_on(struct screen *s, struct grid_cell *gc, int cursor)
{
u_int sx, sy;
@@ -681,7 +681,7 @@ screen_alternate_on(struct screen *s, struct grid_cell *gc, int cursor)
#endif
if (SCREEN_IS_ALTERNATE(s))
return;
return 0;
sx = screen_size_x(s);
sy = screen_size_y(s);
@@ -703,10 +703,12 @@ screen_alternate_on(struct screen *s, struct grid_cell *gc, int cursor)
s->saved_flags = s->grid->flags;
s->grid->flags &= ~GRID_HISTORY;
return 1;
}
/* Exit alternate screen mode and restore the copied grid. */
void
int
screen_alternate_off(struct screen *s, struct grid_cell *gc, int cursor)
{
u_int sx = screen_size_x(s), sy = screen_size_y(s);
@@ -738,7 +740,7 @@ screen_alternate_off(struct screen *s, struct grid_cell *gc, int cursor)
s->cx = screen_size_x(s) - 1;
if (s->cy > screen_size_y(s) - 1)
s->cy = screen_size_y(s) - 1;
return;
return 0;
}
/* Restore the saved grid. */
@@ -767,6 +769,8 @@ screen_alternate_off(struct screen *s, struct grid_cell *gc, int cursor)
s->cx = screen_size_x(s) - 1;
if (s->cy > screen_size_y(s) - 1)
s->cy = screen_size_y(s) - 1;
return 1;
}
/* Get mode as a string. */