aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/search.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-12-26 07:02:44 +0100
committerGitHub <noreply@github.com>2019-12-26 07:02:44 +0100
commit927a4f24e09e879ae1006aab32ead81985c61865 (patch)
tree5e1ead3a895263522c061d9de733514a86476f41 /src/nvim/search.c
parent5f1aec5abdb551e5f3035ca054d36580b3233efb (diff)
parent234c4a846bc78b2cc119b72b994b3ac3f401c8c3 (diff)
downloadrneovim-927a4f24e09e879ae1006aab32ead81985c61865.tar.gz
rneovim-927a4f24e09e879ae1006aab32ead81985c61865.tar.bz2
rneovim-927a4f24e09e879ae1006aab32ead81985c61865.zip
Merge #11612 from janlazo/clang-pvs
Diffstat (limited to 'src/nvim/search.c')
-rw-r--r--src/nvim/search.c9
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) {