aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-07-26 05:21:44 -0400
committerJustin M. Keyes <justinkz@gmail.com>2019-07-26 11:21:44 +0200
commit2b731a388a0fc2742911f6449b7b7fccf2590550 (patch)
tree9133657636b7d47f7d0d9688ec3b3341a0893117
parentb42bfa599b3fc15d0b613cfcff8c742e57854cf3 (diff)
downloadrneovim-2b731a388a0fc2742911f6449b7b7fccf2590550.tar.gz
rneovim-2b731a388a0fc2742911f6449b7b7fccf2590550.tar.bz2
rneovim-2b731a388a0fc2742911f6449b7b7fccf2590550.zip
vim-patch:8.1.1747: unused variables #10605
Problem: Compiler warning for unused variables. (Tony Mechelynck) Solution: Add #ifdef. https://github.com/vim/vim/commit/fbfb757d4cb19e14853605f70ac663e42ec74663
-rw-r--r--src/nvim/screen.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 3f0a85b874..877bd2db21 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -609,8 +609,7 @@ static void win_update(win_T *wp)
updating. 999 when no bot area updating */
int scrolled_down = FALSE; /* TRUE when scrolled down when
w_topline got smaller a bit */
- matchitem_T *cur; /* points to the match list */
- int top_to_mod = FALSE; /* redraw above mod_top */
+ bool top_to_mod = false; // redraw above mod_top
int row; /* current window row to display */
linenr_T lnum; /* current buffer lnum to display */
@@ -705,21 +704,20 @@ static void win_update(win_T *wp)
if (mod_bot == 0 || mod_bot < buf->b_mod_bot)
mod_bot = buf->b_mod_bot;
- /* When 'hlsearch' is on and using a multi-line search pattern, a
- * change in one line may make the Search highlighting in a
- * previous line invalid. Simple solution: redraw all visible
- * lines above the change.
- * Same for a match pattern.
- */
+ // When 'hlsearch' is on and using a multi-line search pattern, a
+ // change in one line may make the Search highlighting in a
+ // previous line invalid. Simple solution: redraw all visible
+ // lines above the change.
+ // Same for a match pattern.
if (search_hl.rm.regprog != NULL
- && re_multiline(search_hl.rm.regprog))
- top_to_mod = TRUE;
- else {
- cur = wp->w_match_head;
+ && re_multiline(search_hl.rm.regprog)) {
+ top_to_mod = true;
+ } else {
+ const matchitem_T *cur = wp->w_match_head;
while (cur != NULL) {
if (cur->match.regprog != NULL
&& re_multiline(cur->match.regprog)) {
- top_to_mod = TRUE;
+ top_to_mod = true;
break;
}
cur = cur->next;