diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-12-25 17:15:52 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-12-26 00:29:14 -0500 |
commit | fd429345c9a2d889fe04356300a7ceee483ef097 (patch) | |
tree | 267ce04e5b3dddadbf20f2151a5b541e099e002f /src | |
parent | 6a0242beead9196a60836a375d0207aa50126973 (diff) | |
download | rneovim-fd429345c9a2d889fe04356300a7ceee483ef097.tar.gz rneovim-fd429345c9a2d889fe04356300a7ceee483ef097.tar.bz2 rneovim-fd429345c9a2d889fe04356300a7ceee483ef097.zip |
search: fix pvs/v1048
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/search.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c index 5e32715e49..3ee9777805 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -2175,17 +2175,14 @@ pos_T *findmatchlimit(oparg_T *oap, int initc, int flags, int64_t maxtravel) * Return MAXCOL if not, otherwise return the column. * TODO: skip strings. */ -static int check_linecomment(char_u *line) +static int check_linecomment(const char_u *line) { - char_u *p; - - p = line; - /* skip Lispish one-line comments */ + const char_u *p = line; // scan from start + // skip Lispish one-line comments if (curbuf->b_p_lisp) { if (vim_strchr(p, ';') != NULL) { /* there may be comments */ int in_str = FALSE; /* inside of string */ - p = line; /* scan from start */ while ((p = vim_strpbrk(p, (char_u *)"\";")) != NULL) { if (*p == '"') { if (in_str) { |