From f4f9e7eaf34d9a91c4a280aa01f865a5e30634e5 Mon Sep 17 00:00:00 2001 From: André Twupack Date: Thu, 11 Sep 2014 20:11:57 +0200 Subject: vim-patch:7.4.348 Problem: When using "J1" in 'cinoptions' a line below a continuation line gets too much indent. Solution: Fix parenthesis in condition. https://code.google.com/p/vim/source/detail?r=v7-4-348 --- src/nvim/indent_c.c | 10 ++++++---- src/nvim/version.c | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'src') 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/version.c b/src/nvim/version.c index 7143be48c7..dccd47846e 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -247,7 +247,7 @@ static int included_patches[] = { //351, //350, //349, - //348, + 348, //347, 346, 345, -- cgit