mirror of
https://github.com/tmux/tmux.git
synced 2024-12-14 02:48:47 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
8e33cc61b1
9
tty.c
9
tty.c
@ -1217,7 +1217,7 @@ tty_draw_line(struct tty *tty, struct window_pane *wp, struct screen *s,
|
|||||||
const struct grid_cell *gcp;
|
const struct grid_cell *gcp;
|
||||||
struct grid_line *gl;
|
struct grid_line *gl;
|
||||||
u_int i, j, ux, sx, width;
|
u_int i, j, ux, sx, width;
|
||||||
int flags, cleared = 0;
|
int flags, cleared = 0, wrapped = 0;
|
||||||
char buf[512];
|
char buf[512];
|
||||||
size_t len;
|
size_t len;
|
||||||
u_int cellsize;
|
u_int cellsize;
|
||||||
@ -1274,8 +1274,10 @@ tty_draw_line(struct tty *tty, struct window_pane *wp, struct screen *s,
|
|||||||
tty_putcode(tty, TTYC_EL1);
|
tty_putcode(tty, TTYC_EL1);
|
||||||
cleared = 1;
|
cleared = 1;
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
log_debug("%s: wrapped line %u", __func__, aty);
|
log_debug("%s: wrapped line %u", __func__, aty);
|
||||||
|
wrapped = 1;
|
||||||
|
}
|
||||||
|
|
||||||
memcpy(&last, &grid_default_cell, sizeof last);
|
memcpy(&last, &grid_default_cell, sizeof last);
|
||||||
len = 0;
|
len = 0;
|
||||||
@ -1299,6 +1301,7 @@ tty_draw_line(struct tty *tty, struct window_pane *wp, struct screen *s,
|
|||||||
tty_clear_line(tty, wp, aty, atx + ux, width,
|
tty_clear_line(tty, wp, aty, atx + ux, width,
|
||||||
last.bg);
|
last.bg);
|
||||||
} else {
|
} else {
|
||||||
|
if (!wrapped || atx != 0 || ux != 0)
|
||||||
tty_cursor(tty, atx + ux, aty);
|
tty_cursor(tty, atx + ux, aty);
|
||||||
tty_putn(tty, buf, len, width);
|
tty_putn(tty, buf, len, width);
|
||||||
}
|
}
|
||||||
@ -1306,6 +1309,7 @@ tty_draw_line(struct tty *tty, struct window_pane *wp, struct screen *s,
|
|||||||
|
|
||||||
len = 0;
|
len = 0;
|
||||||
width = 0;
|
width = 0;
|
||||||
|
wrapped = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gcp->flags & GRID_FLAG_SELECTED)
|
if (gcp->flags & GRID_FLAG_SELECTED)
|
||||||
@ -1339,6 +1343,7 @@ tty_draw_line(struct tty *tty, struct window_pane *wp, struct screen *s,
|
|||||||
log_debug("%s: %zu cleared (end)", __func__, len);
|
log_debug("%s: %zu cleared (end)", __func__, len);
|
||||||
tty_clear_line(tty, wp, aty, atx + ux, width, last.bg);
|
tty_clear_line(tty, wp, aty, atx + ux, width, last.bg);
|
||||||
} else {
|
} else {
|
||||||
|
if (!wrapped || atx != 0 || ux != 0)
|
||||||
tty_cursor(tty, atx + ux, aty);
|
tty_cursor(tty, atx + ux, aty);
|
||||||
tty_putn(tty, buf, len, width);
|
tty_putn(tty, buf, len, width);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user