mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
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 #9229)
This commit is contained in:
@@ -1627,6 +1627,10 @@ op_insert(oparg_T *oap, long count1)
|
||||
--bd2.textlen;
|
||||
}
|
||||
bd.textcol = bd2.textcol;
|
||||
if (did_indent && bd.textcol > ind_pre)
|
||||
// If the insert was in the indent then include the indent
|
||||
// change in the new text, otherwise don't.
|
||||
bd.textcol += ind_post - ind_pre;
|
||||
bd.textlen = bd2.textlen;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user