gvim.exe --clean.1
2
3
aaa
5
6
aaa
7
/aaa/-1 and press Enter. gVim moves to line 3 (expected), but for some reason changes the command line to /aaa/+-1 (probably a bug)..
9.1.1627
OS: Windows 10 Home 22H2,
Terminal: GUI.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
This seems to fix the + problem:
diff --git a/src/search.c b/src/search.c index 9a6bb3fbd..b9fbf19d1 100644 --- a/src/search.c +++ b/src/search.c @@ -1453,7 +1453,7 @@ do_search( off_buf[off_len++] = 'e'; else if (!spats[0].off.line) off_buf[off_len++] = 's'; - if (spats[0].off.off > 0 || spats[0].off.line) + if (spats[0].off.off > 0) off_buf[off_len++] = '+'; off_buf[off_len] = NUL; if (spats[0].off.off != 0 || spats[0].off.line)
- Press n to move forward to the next match. Nothing happens (also probably a bug).
I think this is working as intended, as the next match is still on line 4, so cursor remains on line 3.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Or perhaps this is better:
diff --git a/src/search.c b/src/search.c index 9a6bb3fbd..31b7d1934 100644 --- a/src/search.c +++ b/src/search.c @@ -1453,11 +1453,9 @@ do_search( off_buf[off_len++] = 'e'; else if (!spats[0].off.line) off_buf[off_len++] = 's';
- if (spats[0].off.off > 0 || spats[0].off.line)
- off_buf[off_len++] = '+';off_buf[off_len] = NUL; if (spats[0].off.off != 0 || spats[0].off.line)
- off_len += vim_snprintf((char *)off_buf + off_len, sizeof(off_buf) - off_len, "%ld", spats[0].off.off); + off_len += vim_snprintf((char *)off_buf + off_len, sizeof(off_buf) - off_len, "%+ld", spats[0].off.off); } if (*searchstr == NUL)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Closed #17993 as completed via ade0815.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.