mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 14:28:18 +00:00
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)
de5cf28781
This commit is contained in:
@@ -522,6 +522,11 @@ int inindent(int extra)
|
||||
}
|
||||
}
|
||||
|
||||
/// @return true if the conditions are OK for smart indenting.
|
||||
bool may_do_si(void)
|
||||
{
|
||||
return curbuf->b_p_si && !curbuf->b_p_cin && *curbuf->b_p_inde == NUL && !p_paste;
|
||||
}
|
||||
|
||||
// Get indent level from 'indentexpr'.
|
||||
int get_expr_indent(void)
|
||||
|
Reference in New Issue
Block a user