aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/indent_c.c10
-rw-r--r--src/nvim/screen.c5
-rw-r--r--src/nvim/version.c4
-rw-r--r--src/nvim/window.c6
4 files changed, 15 insertions, 10 deletions
diff --git a/src/nvim/indent_c.c b/src/nvim/indent_c.c
index 6e12194b63..509f94dbf2 100644
--- a/src/nvim/indent_c.c
+++ b/src/nvim/indent_c.c
@@ -2009,12 +2009,14 @@ int get_c_indent(void)
* ldfd) {
* }
*/
- if (curbuf->b_ind_js || (curbuf->b_ind_keep_case_label
- && cin_iscase(skipwhite(get_cursor_line_ptr()),
- FALSE)))
+ if ((curbuf->b_ind_js || curbuf->b_ind_keep_case_label)
+ && cin_iscase(skipwhite(get_cursor_line_ptr()), FALSE)) {
amount = get_indent();
- else
+ } else if (curbuf->b_ind_js) {
+ amount = get_indent_lnum(lnum);
+ } else {
amount = skip_label(lnum, &l);
+ }
start_brace = BRACE_AT_END;
}
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index a84d3490f0..29e5af5cee 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -1356,8 +1356,9 @@ static void win_update(win_T *wp)
(foldmethodIsSyntax(wp)
&& hasAnyFolding(wp)) ||
syntax_check_changed(lnum)))
- /* match in fixed position might need redraw */
- || wp->w_match_head != NULL
+ // match in fixed position might need redraw
+ // if lines were inserted or deleted
+ || (wp->w_match_head != NULL && buf->b_mod_xlines != 0)
))))) {
if (lnum == mod_top)
top_to_mod = FALSE;
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 7143be48c7..dfcf086e87 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -246,8 +246,8 @@ static int included_patches[] = {
352,
//351,
//350,
- //349,
- //348,
+ 349,
+ 348,
//347,
346,
345,
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 0693e50bda..b9714ce690 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -5323,12 +5323,13 @@ int match_add(win_T *wp, char_u *grp, char_u *pat, int prio, int id, list_T *pos
wp->w_buffer->b_mod_bot = botlnum;
}
} else {
+ wp->w_buffer->b_mod_set = TRUE;
wp->w_buffer->b_mod_top = toplnum;
wp->w_buffer->b_mod_bot = botlnum;
+ wp->w_buffer->b_mod_xlines = 0;
}
m->pos.toplnum = toplnum;
m->pos.botlnum = botlnum;
- wp->w_buffer->b_mod_set = TRUE;
rtype = VALID;
}
}
@@ -5396,10 +5397,11 @@ int match_delete(win_T *wp, int id, int perr)
wp->w_buffer->b_mod_bot = cur->pos.botlnum;
}
} else {
+ wp->w_buffer->b_mod_set = TRUE;
wp->w_buffer->b_mod_top = cur->pos.toplnum;
wp->w_buffer->b_mod_bot = cur->pos.botlnum;
+ wp->w_buffer->b_mod_xlines = 0;
}
- wp->w_buffer->b_mod_set = TRUE;
rtype = VALID;
}
free(cur);