mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-11 11:15:24 +03:00
Fix indentation bug in suggestedIndentForBufferRow
A leading space was being accounted for when doing some math to compute indent level… but not on both sides of the equation.
This commit is contained in:
parent
adfdd05472
commit
6767cda288
@ -1520,7 +1520,7 @@ class WASMTreeSitterLanguageMode {
|
||||
}
|
||||
|
||||
scopeResolver.reset();
|
||||
let finalIndent = comparisonRowIndent + indentDelta + dedentDelta;
|
||||
let finalIndent = comparisonRowIndent + indentDelta + dedentDelta + existingIndent;
|
||||
// console.log('score:', comparisonRowIndent, '+', indentDelta, '-', ((dedentDelta < 0) ? -dedentDelta : dedentDelta), '=', finalIndent);
|
||||
|
||||
return Math.max(finalIndent - existingIndent, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user