Formatting on paste changed existed code format but not the new one #72036
Labels
editor-autoindent
Editor auto indentation issues
under-discussion
Issue is under discussion for relevance, priority, approach
(for example you paste
\nint
and without the ending;
, this often occurs when you meant to paste a common used long declare part and then write down the variable name, and somehow you decided to include the leading newline, often can be done by using the touchscreen to position and then pressingShift+up
so you selected the whole line before your cursor, and also the leading newline)result:
the already existed code after your pasted code is incorrectly auto-indented
This will cause more confusing especially when you paste code with an unpaired bracelet, for example
{
, which will cause the whole indent after the code changed until the next bracelet.This should consider a bug for the reason that once you paste uncompleted code(which can be detected easily using the intellisense), in most time you meant to modify the new codes but the existing completed ones. Unfortunately there's no way to avoid these unless you choose to disable the format-on-paste, which will lead to no indent adjusting on paste at all.
The text was updated successfully, but these errors were encountered: