bugfix: wrong indent.

This commit is contained in:
cgspine
2022-03-02 20:36:11 +08:00
parent 0e9d94bf6f
commit 94359efe3f
@@ -50,7 +50,7 @@ class SerialLineIndentHandler(
private fun calculateIndent(typeModel: TypeModel, pair: Pair<Int, Int>): Int {
var indent = 0
var el = typeModel.getByPos(pair.first)
while (el != null && el.start + el.text.length <= pair.second){
while (el != null && el.start <= pair.second){
indent += el.measureWidth
el = el.next
}