summaryrefslogtreecommitdiffstatshomepage
path: root/src/nvim/screen.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2020-09-06 10:34:44 -0700
committerGitHub <noreply@github.com>2020-09-06 10:34:44 -0700
commitd9dd30a955073d602741481d48e1c56d1fcae420 (patch)
tree586c14820bc373568db0d9660583d0958f1d6d0f /src/nvim/screen.c
parentc685a2ef487ebfffeb93274eee79d29c7e6bd6d1 (diff)
parentb2cef8b6650627f65c43029645942d46103a77df (diff)
Merge #12822 release-0.4 patchesrelease-0.4
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r--src/nvim/screen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 4b4b2c416f..05e3d90c8f 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -2692,8 +2692,8 @@ win_line (
off += col;
}
- // wont highlight after 1024 columns
- int term_attrs[1024] = {0};
+ // wont highlight after TERM_ATTRS_MAX columns
+ int term_attrs[TERM_ATTRS_MAX] = { 0 };
if (wp->w_buffer->terminal) {
terminal_get_line_attributes(wp->w_buffer->terminal, wp, lnum, term_attrs);
extra_check = true;
@@ -4030,7 +4030,7 @@ win_line (
int n = wp->w_p_rl ? -1 : 1;
while (col >= 0 && col < grid->Columns) {
schar_from_ascii(linebuf_char[off], ' ');
- linebuf_attr[off] = term_attrs[vcol];
+ linebuf_attr[off] = vcol >= TERM_ATTRS_MAX ? 0 : term_attrs[vcol];
off += n;
vcol += n;
col += n;