summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/format.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2020-04-18 09:00:32 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2020-04-18 09:00:32 +0000
commitb364a315595d25a1625e5f6429900e575aa8762c (patch)
treeeb6d0dde1f5dcfb3e60e3d6f8d0a5f0207481f28 /usr.bin/tmux/format.c
parentbf8d44361c4c70055eddde85b223afde30d1aa6a (diff)
Use peek line function instead of hoking in the array directly.
Diffstat (limited to 'usr.bin/tmux/format.c')
-rw-r--r--usr.bin/tmux/format.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c
index fc829d0c1b8..38a388d103f 100644
--- a/usr.bin/tmux/format.c
+++ b/usr.bin/tmux/format.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: format.c,v 1.243 2020/04/18 07:19:28 nicm Exp $ */
+/* $OpenBSD: format.c,v 1.244 2020/04/18 09:00:31 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -977,7 +977,7 @@ format_grid_word(struct grid *gd, u_int x, u_int y)
if (x == 0) {
if (y == 0)
break;
- gl = &gd->linedata[y - 1];
+ gl = grid_peek_line(gd, y - 1);
if (~gl->flags & GRID_LINE_WRAPPED)
break;
y--;
@@ -993,7 +993,7 @@ format_grid_word(struct grid *gd, u_int x, u_int y)
if (end == 0 || x == end - 1) {
if (y == gd->hsize + gd->sy - 1)
break;
- gl = &gd->linedata[y];
+ gl = grid_peek_line(gd, y);
if (~gl->flags & GRID_LINE_WRAPPED)
break;
y++;