← Commit list

c76c78740

Ron Yorston
Ron Yorston
2021-07-13
SUCCESS Duration: 152s

Subject

vi: improve handling of anchored searches

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

editors/vi.c+2 -0
@@ -2384,6 +2384,8 @@ static char *char_search(char *p, const char *pat, int dir_and_range)
memset(&preg, 0, sizeof(preg));
err = re_compile_pattern(pat, strlen(pat), &preg);
+ preg.not_bol = p != text;
+ preg.not_eol = p != end - 1;
if (err != NULL) {
status_line_bold("bad search pattern '%s': %s", pat, err);
return p;