From b711d51aee248acdb82bd3ad73c0cbc8de19a55f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pankowski?= Date: Sun, 14 Sep 2025 19:17:31 +0200 Subject: [PATCH] fix: agree st-autocomplete with st-scrollback-ringbuffer --- st.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/st.c b/st.c index 5094f5b..a37cced 100644 --- a/st.c +++ b/st.c @@ -2956,8 +2956,8 @@ void autocomplete (const Arg *arg) { size_t x = 0; for (; x < term.col; x++) - utf8encode(term.line[y][x].u, stbufline + x); - if (term.line[y][x - 1].mode & ATTR_WRAP) { + utf8encode(TLINE(y)[x].u, stbufline + x); + if (TLINE(y)[x - 1].mode & ATTR_WRAP) { x--; if (y <= term.c.y) cy--; cxp++; @@ -3058,7 +3058,7 @@ acmpl_begin: int wl = 0; int tl = line; for (int l = 0; l < tl; l++) - if (term.line[l][term.col - 1].mode & ATTR_WRAP) { + if (TLINE(l)[term.col - 1].mode & ATTR_WRAP) { wl++; tl++; }