Fixed indent behaviour with a single empty line ()

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>
This commit is contained in:
Victor Ilyushchenko 2024-12-25 18:35:26 +03:00 committed by GitHub
parent 780721f7fd
commit 436dfd3fc2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)