If you copy something at the beginning of the line, pasting it will include the indent. Eg., let’s say I have this:
if (foo) {
bar = foo +
}
If you select “bar” (but not the preceding whitespace indentation) and copy it, then paste it, after the “+”, you get:
if (foo) {
bar = foo + bar
}
Has probably existed since 2162, where the changelog has an entry about indentation and pasting.