diff --git a/tmux.h b/tmux.h index 4ae6d6ad..be74a3a7 100644 --- a/tmux.h +++ b/tmux.h @@ -63,11 +63,8 @@ struct tmuxproc; #define TMUX_CONF "/etc/tmux.conf" #endif -/* - * Minimum layout cell size, NOT including separator line. The scroll region - * cannot be one line in height so this must be at least two. - */ -#define PANE_MINIMUM 2 +/* Minimum layout cell size, NOT including border lines. */ +#define PANE_MINIMUM 1 /* Minimum and maximum window size. */ #define WINDOW_MINIMUM PANE_MINIMUM diff --git a/tty.c b/tty.c index 906ee269..00f58d1c 100644 --- a/tty.c +++ b/tty.c @@ -1441,7 +1441,9 @@ tty_cmd_insertline(struct tty *tty, const struct tty_ctx *ctx) !tty_pane_full_width(tty, ctx) || tty_fake_bce(tty, ctx->wp, ctx->bg) || !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); return; } @@ -1463,7 +1465,9 @@ tty_cmd_deleteline(struct tty *tty, const struct tty_ctx *ctx) !tty_pane_full_width(tty, ctx) || tty_fake_bce(tty, ctx->wp, ctx->bg) || !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); return; } @@ -1524,7 +1528,9 @@ tty_cmd_reverseindex(struct tty *tty, const struct tty_ctx *ctx) !tty_pane_full_width(tty, ctx) || tty_fake_bce(tty, wp, 8) || !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); return; } @@ -1549,7 +1555,9 @@ tty_cmd_linefeed(struct tty *tty, const struct tty_ctx *ctx) if (ctx->bigger || (!tty_pane_full_width(tty, ctx) && !tty_use_margin(tty)) || 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); return; } @@ -1586,7 +1594,9 @@ tty_cmd_scrollup(struct tty *tty, const struct tty_ctx *ctx) if (ctx->bigger || (!tty_pane_full_width(tty, ctx) && !tty_use_margin(tty)) || 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); return; } diff --git a/window-copy.c b/window-copy.c index 383f2c4e..78667b1e 100644 --- a/window-copy.c +++ b/window-copy.c @@ -1299,7 +1299,7 @@ window_copy_write_line(struct window_pane *wp, struct screen_write_ctx *ctx, style_apply(&gc, oo, "mode-style"); gc.flags |= GRID_FLAG_NOPALETTE; - if (py == 0) { + if (py == 0 && s->rupper < s->rlower) { if (data->searchmark == NULL) { size = xsnprintf(hdr, sizeof hdr, "[%u/%u]", data->oy, screen_hsize(data->backing));