diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/search.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c index 457a6c309d..dc4ae2e847 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -1849,7 +1849,7 @@ pos_T *findmatchlimit(oparg_T *oap, int initc, int flags, int64_t maxtravel) } else { /* Searching backwards */ /* * A comment may contain / * or / /, it may also start or end - * with / * /. Ignore a / * after / /. + * with / * /. Ignore a / * after / / and after *. */ if (pos.col == 0) continue; @@ -1874,6 +1874,7 @@ pos_T *findmatchlimit(oparg_T *oap, int initc, int flags, int64_t maxtravel) } } else if ( linep[pos.col - 1] == '/' && linep[pos.col] == '*' + && (pos.col == 1 || linep[pos.col - 2] != '*') && (int)pos.col < comment_col) { count++; match_pos = pos; |