fix: agree st-autocomplete with st-scrollback-ringbuffer
This commit is contained in:
6
st.c
6
st.c
@@ -2934,8 +2934,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++;
|
||||
@@ -3036,7 +3036,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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user