comparison src/change.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 77a00aa3e215
children a04815de0bd3
comparison
equal deleted inserted replaced
28855:39fddf7b52c1 28856:948877671c54
1390 pos_T *pos; 1390 pos_T *pos;
1391 #ifdef FEAT_CINDENT 1391 #ifdef FEAT_CINDENT
1392 int do_cindent; 1392 int do_cindent;
1393 #endif 1393 #endif
1394 #ifdef FEAT_SMARTINDENT 1394 #ifdef FEAT_SMARTINDENT
1395 int do_si = (!p_paste && curbuf->b_p_si 1395 int do_si = may_do_si();
1396 # ifdef FEAT_CINDENT
1397 && !curbuf->b_p_cin
1398 # endif
1399 # ifdef FEAT_EVAL
1400 && *curbuf->b_p_inde == NUL
1401 # endif
1402 );
1403 int no_si = FALSE; // reset did_si afterwards 1396 int no_si = FALSE; // reset did_si afterwards
1404 int first_char = NUL; // init for GCC 1397 int first_char = NUL; // init for GCC
1405 #endif 1398 #endif
1406 #if defined(FEAT_LISP) || defined(FEAT_CINDENT) 1399 #if defined(FEAT_LISP) || defined(FEAT_CINDENT)
1407 int vreplace_mode; 1400 int vreplace_mode;