diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-05-14 18:55:50 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-05-14 20:05:39 +0800 |
commit | 24eb1af4754b3061d0968112342ca5389b68d4f6 (patch) | |
tree | f39bf17c2160fb95f32ae0d81dd7d90d66375180 /src/nvim/ops.c | |
parent | 99f3e74fc27acb0d9d9f32161e18b5a474697074 (diff) | |
download | rneovim-24eb1af4754b3061d0968112342ca5389b68d4f6.tar.gz rneovim-24eb1af4754b3061d0968112342ca5389b68d4f6.tar.bz2 rneovim-24eb1af4754b3061d0968112342ca5389b68d4f6.zip |
vim-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 vim/vim#10420)
https://github.com/vim/vim/commit/de5cf287812510d2c8ffe66b99cf33c4e1a6e6f1
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r-- | src/nvim/ops.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 7b3895333b..1342b10bf8 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -2507,10 +2507,7 @@ int op_change(oparg_T *oap) l = oap->start.col; if (oap->motion_type == kMTLineWise) { l = 0; - if (!p_paste && curbuf->b_p_si - && !curbuf->b_p_cin) { - 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 } // First delete the text in the region. In an empty buffer only need to |