diff src/ops.c @ 28856:948877671c54 v8.2.4951

patch 8.2.4951: smart indenting done when not enabled Commit: https://github.com/vim/vim/commit/de5cf287812510d2c8ffe66b99cf33c4e1a6e6f1 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 14 11:52:23 2022 +0100 patch 8.2.4951: smart indenting done when not enabled Problem: Smart indenting done when not enabled. Solution: Check option values before setting can_si. (closes https://github.com/vim/vim/issues/10420)
author Bram Moolenaar <Bram@vim.org>
date Sat, 14 May 2022 13:00:05 +0200
parents 647d7f439622
children 6a4edacbd178
line wrap: on
line diff
--- a/src/ops.c
+++ b/src/ops.c
@@ -1718,12 +1718,7 @@ op_change(oparg_T *oap)
     {
 	l = 0;
 #ifdef FEAT_SMARTINDENT
-	if (!p_paste && curbuf->b_p_si
-# ifdef FEAT_CINDENT
-		&& !curbuf->b_p_cin
-# endif
-		)
-	    can_si = TRUE;	// It's like opening a new line, do si
+	can_si = may_do_si();	// Like opening a new line, do smart indent
 #endif
     }