diff options
author | André Twupack <atwupack@mailbox.org> | 2014-09-11 20:11:57 +0200 |
---|---|---|
committer | André Twupack <atwupack@mailbox.org> | 2014-09-11 20:11:57 +0200 |
commit | f4f9e7eaf34d9a91c4a280aa01f865a5e30634e5 (patch) | |
tree | 043551d900e68ef1dcd7968ddc8e124434779a05 /src/nvim/indent_c.c | |
parent | 053a13d2a4ee0188c851ed58539c0fa5cb2c71b8 (diff) | |
download | rneovim-f4f9e7eaf34d9a91c4a280aa01f865a5e30634e5.tar.gz rneovim-f4f9e7eaf34d9a91c4a280aa01f865a5e30634e5.tar.bz2 rneovim-f4f9e7eaf34d9a91c4a280aa01f865a5e30634e5.zip |
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
Diffstat (limited to 'src/nvim/indent_c.c')
-rw-r--r-- | src/nvim/indent_c.c | 10 |
1 files changed, 6 insertions, 4 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; } |