mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 05:28:33 +00:00
vim-patch:8.2.3684: blockwise insert does not handle autoindent properly
Problem: Blockwise insert does not handle autoindent properly.
Solution: Adjust text column for indent. (closes vim/vim#9229)
e9b0b40b79
This commit is contained in:
@@ -2311,6 +2311,13 @@ void op_insert(oparg_T *oap, long count1)
|
||||
}
|
||||
}
|
||||
bd.textcol = bd2.textcol;
|
||||
/*
|
||||
* If the insert was in the indent then include the indent
|
||||
* change in the new text, otherwise don't.
|
||||
*/
|
||||
if (did_indent && bd.textcol > ind_pre) {
|
||||
bd.textcol += ind_post - ind_pre;
|
||||
}
|
||||
bd.textlen = bd2.textlen;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user