From 42863634dd83d70710436bb599b13571d734c662 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 5 Jul 2022 14:58:59 +0800 Subject: vim-patch:8.2.3615: wrong indent in first line if re-formatting with indent expr Problem: When re-formatting with an indent expression the first line of a paragraph may get the wrong indent. (Martin F. Krafft) Solution: Apply the correct indenting function for the first line. (Christian Brabandt, closes vim/vim#9150, closes vim/vim#9056) https://github.com/vim/vim/commit/818ff25cd1aabf60b9cd239da2f1328a959954f7 --- src/nvim/edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/edit.c') diff --git a/src/nvim/edit.c b/src/nvim/edit.c index d21583e951..e3c80505c8 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -7330,7 +7330,7 @@ static void replace_do_bs(int limit_col) } /// Check that C-indenting is on. -static bool cindent_on(void) +bool cindent_on(void) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { return !p_paste && (curbuf->b_p_cin || *curbuf->b_p_inde != NUL); -- cgit