diff options
author | James McCoy <jamessan@jamessan.com> | 2017-01-10 10:59:02 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2017-01-10 13:05:41 -0500 |
commit | fc47bd92dfde8d181bbabe4c6843eb5379b55f28 (patch) | |
tree | c6615f9959bf429c2acdad15ec1885a0a6d4f057 | |
parent | 4c3204097c278bf911440584dd1df0d5a0a5293d (diff) | |
download | rneovim-fc47bd92dfde8d181bbabe4c6843eb5379b55f28.tar.gz rneovim-fc47bd92dfde8d181bbabe4c6843eb5379b55f28.tar.bz2 rneovim-fc47bd92dfde8d181bbabe4c6843eb5379b55f28.zip |
lint
-rw-r--r-- | src/nvim/search.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c index 8cfac8c362..2a087276e7 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -3976,12 +3976,10 @@ current_search ( return OK; } -/* - * Check if the pattern is one character long or zero-width. - * If move is true, check from the beginning of the buffer, - * else from the current cursor position. - * Returns TRUE, FALSE or -1 for failure. - */ +/// Check if the pattern is one character long or zero-width. +/// If move is true, check from the beginning of the buffer, +/// else from the current cursor position. +/// Returns TRUE, FALSE or -1 for failure. static int is_one_char(char_u *pattern, bool move) { regmmatch_T regmatch; @@ -4001,7 +3999,7 @@ static int is_one_char(char_u *pattern, bool move) // init startcol correctly regmatch.startpos[0].col = -1; - /* move to match */ + // move to match if (move) { clearpos(&pos); } else { @@ -4010,10 +4008,10 @@ static int is_one_char(char_u *pattern, bool move) flag = SEARCH_START; } if (searchit(curwin, curbuf, &pos, FORWARD, pattern, 1, - SEARCH_KEEP + flag, RE_SEARCH, 0, NULL) != FAIL) { - /* Zero-width pattern should match somewhere, then we can check if - * start and end are in the same position. */ - called_emsg = FALSE; + SEARCH_KEEP + flag, RE_SEARCH, 0, NULL) != FAIL) { + // Zero-width pattern should match somewhere, then we can check if + // start and end are in the same position. + called_emsg = false; do { regmatch.startpos[0].col++; nmatched = vim_regexec_multi(®match, curwin, curbuf, |