From b00fd496405e0864e3cb5cc8b62241fb9610480f Mon Sep 17 00:00:00 2001 From: ckelsel Date: Sat, 20 Jan 2018 15:47:56 +0800 Subject: vim-patch:8.0.0423: changing 'cinoptions' does not always work Problem: The effect of adding "vim/vim#" to 'cinoptions' is not always removed. (David Briscoe) Solution: Reset b_ind_hash_comment. (Christian Brabandt, closes vim/vim#1475) https://github.com/vim/vim/commit/6b64394f346594404cffb9591d71ac693040679f --- src/nvim/indent_c.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/nvim/indent_c.c') diff --git a/src/nvim/indent_c.c b/src/nvim/indent_c.c index 279d45bb0a..53364c0fc5 100644 --- a/src/nvim/indent_c.c +++ b/src/nvim/indent_c.c @@ -1619,6 +1619,9 @@ void parse_cino(buf_T *buf) * while(). */ buf->b_ind_if_for_while = 0; + // indentation for # comments + buf->b_ind_hash_comment = 0; + for (p = buf->b_p_cino; *p; ) { l = p++; if (*p == '-') -- cgit