mirror of
https://github.com/tmux/tmux.git
synced 2024-11-18 18:38:54 +00:00
Allow panes to be 1 line or column by redrawing instead of using the
scroll region, from Soeren Tempel in GitHub issue 1487.
This commit is contained in:
parent
7bc6c105b7
commit
7d59f82cf9
7
tmux.h
7
tmux.h
@ -59,11 +59,8 @@ struct tmuxproc;
|
|||||||
/* Default global configuration file. */
|
/* Default global configuration file. */
|
||||||
#define TMUX_CONF "/etc/tmux.conf"
|
#define TMUX_CONF "/etc/tmux.conf"
|
||||||
|
|
||||||
/*
|
/* Minimum layout cell size, NOT including border lines. */
|
||||||
* Minimum layout cell size, NOT including separator line. The scroll region
|
#define PANE_MINIMUM 1
|
||||||
* cannot be one line in height so this must be at least two.
|
|
||||||
*/
|
|
||||||
#define PANE_MINIMUM 2
|
|
||||||
|
|
||||||
/* Automatic name refresh interval, in microseconds. Must be < 1 second. */
|
/* Automatic name refresh interval, in microseconds. Must be < 1 second. */
|
||||||
#define NAME_INTERVAL 500000
|
#define NAME_INTERVAL 500000
|
||||||
|
20
tty.c
20
tty.c
@ -1145,7 +1145,9 @@ tty_cmd_insertline(struct tty *tty, const struct tty_ctx *ctx)
|
|||||||
if (!tty_pane_full_width(tty, ctx) ||
|
if (!tty_pane_full_width(tty, ctx) ||
|
||||||
tty_fake_bce(tty, ctx->wp, ctx->bg) ||
|
tty_fake_bce(tty, ctx->wp, ctx->bg) ||
|
||||||
!tty_term_has(tty->term, TTYC_CSR) ||
|
!tty_term_has(tty->term, TTYC_CSR) ||
|
||||||
!tty_term_has(tty->term, TTYC_IL1)) {
|
!tty_term_has(tty->term, TTYC_IL1) ||
|
||||||
|
ctx->wp->sx == 1 ||
|
||||||
|
ctx->wp->sy == 1) {
|
||||||
tty_redraw_region(tty, ctx);
|
tty_redraw_region(tty, ctx);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1166,7 +1168,9 @@ tty_cmd_deleteline(struct tty *tty, const struct tty_ctx *ctx)
|
|||||||
if (!tty_pane_full_width(tty, ctx) ||
|
if (!tty_pane_full_width(tty, ctx) ||
|
||||||
tty_fake_bce(tty, ctx->wp, ctx->bg) ||
|
tty_fake_bce(tty, ctx->wp, ctx->bg) ||
|
||||||
!tty_term_has(tty->term, TTYC_CSR) ||
|
!tty_term_has(tty->term, TTYC_CSR) ||
|
||||||
!tty_term_has(tty->term, TTYC_DL1)) {
|
!tty_term_has(tty->term, TTYC_DL1) ||
|
||||||
|
ctx->wp->sx == 1 ||
|
||||||
|
ctx->wp->sy == 1) {
|
||||||
tty_redraw_region(tty, ctx);
|
tty_redraw_region(tty, ctx);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1227,7 +1231,9 @@ tty_cmd_reverseindex(struct tty *tty, const struct tty_ctx *ctx)
|
|||||||
if (!tty_pane_full_width(tty, ctx) ||
|
if (!tty_pane_full_width(tty, ctx) ||
|
||||||
tty_fake_bce(tty, wp, 8) ||
|
tty_fake_bce(tty, wp, 8) ||
|
||||||
!tty_term_has(tty->term, TTYC_CSR) ||
|
!tty_term_has(tty->term, TTYC_CSR) ||
|
||||||
!tty_term_has(tty->term, TTYC_RI)) {
|
!tty_term_has(tty->term, TTYC_RI) ||
|
||||||
|
ctx->wp->sx == 1 ||
|
||||||
|
ctx->wp->sy == 1) {
|
||||||
tty_redraw_region(tty, ctx);
|
tty_redraw_region(tty, ctx);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1251,7 +1257,9 @@ tty_cmd_linefeed(struct tty *tty, const struct tty_ctx *ctx)
|
|||||||
|
|
||||||
if ((!tty_pane_full_width(tty, ctx) && !tty_use_margin(tty)) ||
|
if ((!tty_pane_full_width(tty, ctx) && !tty_use_margin(tty)) ||
|
||||||
tty_fake_bce(tty, wp, 8) ||
|
tty_fake_bce(tty, wp, 8) ||
|
||||||
!tty_term_has(tty->term, TTYC_CSR)) {
|
!tty_term_has(tty->term, TTYC_CSR) ||
|
||||||
|
wp->sx == 1 ||
|
||||||
|
wp->sy == 1) {
|
||||||
tty_redraw_region(tty, ctx);
|
tty_redraw_region(tty, ctx);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1287,7 +1295,9 @@ tty_cmd_scrollup(struct tty *tty, const struct tty_ctx *ctx)
|
|||||||
|
|
||||||
if ((!tty_pane_full_width(tty, ctx) && !tty_use_margin(tty)) ||
|
if ((!tty_pane_full_width(tty, ctx) && !tty_use_margin(tty)) ||
|
||||||
tty_fake_bce(tty, wp, 8) ||
|
tty_fake_bce(tty, wp, 8) ||
|
||||||
!tty_term_has(tty->term, TTYC_CSR)) {
|
!tty_term_has(tty->term, TTYC_CSR) ||
|
||||||
|
wp->sx == 1 ||
|
||||||
|
wp->sy == 1) {
|
||||||
tty_redraw_region(tty, ctx);
|
tty_redraw_region(tty, ctx);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1299,7 +1299,7 @@ window_copy_write_line(struct window_pane *wp, struct screen_write_ctx *ctx,
|
|||||||
style_apply(&gc, oo, "mode-style");
|
style_apply(&gc, oo, "mode-style");
|
||||||
gc.flags |= GRID_FLAG_NOPALETTE;
|
gc.flags |= GRID_FLAG_NOPALETTE;
|
||||||
|
|
||||||
if (py == 0) {
|
if (py == 0 && s->rupper < s->rlower) {
|
||||||
if (data->searchmark == NULL) {
|
if (data->searchmark == NULL) {
|
||||||
size = xsnprintf(hdr, sizeof hdr,
|
size = xsnprintf(hdr, sizeof hdr,
|
||||||
"[%u/%u]", data->oy, screen_hsize(data->backing));
|
"[%u/%u]", data->oy, screen_hsize(data->backing));
|
||||||
|
Loading…
Reference in New Issue
Block a user