fix: agree st-autocomplete with st-scrollback-ringbuffer
This commit is contained in:
6
st.c
6
st.c
@@ -2956,8 +2956,8 @@ void autocomplete (const Arg *arg) {
|
|||||||
|
|
||||||
size_t x = 0;
|
size_t x = 0;
|
||||||
for (; x < term.col; x++)
|
for (; x < term.col; x++)
|
||||||
utf8encode(term.line[y][x].u, stbufline + x);
|
utf8encode(TLINE(y)[x].u, stbufline + x);
|
||||||
if (term.line[y][x - 1].mode & ATTR_WRAP) {
|
if (TLINE(y)[x - 1].mode & ATTR_WRAP) {
|
||||||
x--;
|
x--;
|
||||||
if (y <= term.c.y) cy--;
|
if (y <= term.c.y) cy--;
|
||||||
cxp++;
|
cxp++;
|
||||||
@@ -3058,7 +3058,7 @@ acmpl_begin:
|
|||||||
int wl = 0;
|
int wl = 0;
|
||||||
int tl = line;
|
int tl = line;
|
||||||
for (int l = 0; l < tl; l++)
|
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++;
|
wl++;
|
||||||
tl++;
|
tl++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user