Fixed indent behaviour with a single empty line (#7553)

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>
This commit is contained in:
Victor Ilyushchenko
2024-12-25 22:35:26 +07:00
committed by GitHub
parent 780721f7fd
commit 436dfd3fc2
@@ -125,7 +125,7 @@ export function adjustSelectionIndent (
let insertionOffset = 0
for (const range of ranges) {
if (direction > 0 ? range.text === '' : range.indent === 0) {
if (direction > 0 ? range.text === '' && ranges.length > 1 : range.indent === 0) {
continue
}
const indentOffset = indentLevelOffset(range.indent, direction)