mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 07:16:09 +00:00
refactor: fix clang-tidy warnings
Enable and fix bugprone-misplaced-widening-cast warning. Fix some modernize-macro-to-enum and readability-else-after-return warnings, but don't enable them. While the warnings can be useful, they are in general too noisy to enable.
This commit is contained in:
@@ -805,17 +805,17 @@ bool get_prevcol_hl_flag(win_T *wp, match_T *search_hl, long curcol)
|
||||
|| (prevcol > (long)search_hl->startcol
|
||||
&& search_hl->endcol == MAXCOL))) {
|
||||
return true;
|
||||
} else {
|
||||
cur = wp->w_match_head;
|
||||
while (cur != NULL) {
|
||||
if (!cur->mit_hl.is_addpos && (prevcol == (long)cur->mit_hl.startcol
|
||||
|| (prevcol > (long)cur->mit_hl.startcol
|
||||
&& cur->mit_hl.endcol == MAXCOL))) {
|
||||
return true;
|
||||
}
|
||||
cur = cur->mit_next;
|
||||
}
|
||||
}
|
||||
cur = wp->w_match_head;
|
||||
while (cur != NULL) {
|
||||
if (!cur->mit_hl.is_addpos && (prevcol == (long)cur->mit_hl.startcol
|
||||
|| (prevcol > (long)cur->mit_hl.startcol
|
||||
&& cur->mit_hl.endcol == MAXCOL))) {
|
||||
return true;
|
||||
}
|
||||
cur = cur->mit_next;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user