From: nicm Date: Fri, 6 Aug 2021 07:32:21 +0000 (+0000) Subject: Another minor fix - do not draw positions that are under the popup with X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7e55262dfcb28a0e0bd1d48e542b70ba5134d8ed;p=openbsd Another minor fix - do not draw positions that are under the popup with spaces, from Anindya Mukherjee. Also a typo fix from Linus Arver. --- diff --git a/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c index b83cce19c6d..254b54bcf77 100644 --- a/usr.bin/tmux/screen-write.c +++ b/usr.bin/tmux/screen-write.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screen-write.c,v 1.194 2021/06/10 07:43:44 nicm Exp $ */ +/* $OpenBSD: screen-write.c,v 1.195 2021/08/06 07:32:21 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -596,7 +596,7 @@ screen_write_hline(struct screen_write_ctx *ctx, u_int nx, int left, int right) screen_write_set_cursor(ctx, cx, cy); } -/* Draw a horizontal line on screen. */ +/* Draw a vertical line on screen. */ void screen_write_vline(struct screen_write_ctx *ctx, u_int ny, int top, int bottom) { diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index bd42793989a..801c1e84fc3 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.396 2021/08/06 03:29:15 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.397 2021/08/06 07:32:21 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1463,9 +1463,15 @@ tty_draw_line(struct tty *tty, struct screen *s, u_int px, u_int py, u_int nx, tty_attributes(tty, &last, defaults, palette); tty_cursor(tty, atx + ux, aty); for (j = 0; j < gcp->data.width; j++) { - if (ux + j > nx) + if (ux > nx) break; - tty_putc(tty, ' '); + if (tty_check_overlay(tty, atx + ux, + aty)) + tty_putc(tty, ' '); + else { + tty_cursor(tty, atx + ux + 1, + aty); + } ux++; } }