mirror of
https://github.com/tmux/tmux.git
synced 2026-10-06 17:49:52 +00:00
Only rely on the previous line wrapping when the cursor is actually on
it, GitHub issue 5625 from Ben Maurer.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: tty-draw.c,v 1.16 2026/09/21 10:22:31 nicm Exp $ */
|
/* $OpenBSD: tty-draw.c,v 1.17 2026/09/22 06:49:47 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2026 Nicholas Marriott <nicholas.marriott@gmail.com>
|
* Copyright (c) 2026 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||||
@@ -218,7 +218,12 @@ tty_draw_line(struct tty *tty, struct screen *s, u_int px, u_int py, u_int nx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Did the previous line wrap on to this one? */
|
/* Did the previous line wrap on to this one? */
|
||||||
if (py != 0 && atx == 0 && tty->cx >= tty->sx && nx == tty->sx) {
|
if (py != 0 &&
|
||||||
|
atx == 0 &&
|
||||||
|
tty->cx >= tty->sx &&
|
||||||
|
tty->cy != UINT_MAX &&
|
||||||
|
tty->cy + 1 == aty &&
|
||||||
|
nx == tty->sx) {
|
||||||
gl = grid_get_line(gd, gd->hsize + py - 1);
|
gl = grid_get_line(gd, gd->hsize + py - 1);
|
||||||
if (gl->flags & GRID_LINE_WRAPPED)
|
if (gl->flags & GRID_LINE_WRAPPED)
|
||||||
wrapped = 1;
|
wrapped = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user