Use StoreVisualX() all over the code

Since we already have the StoreVisualX() helper, use it all over the
place instead of setting LastVisualX directly.

This will allow us to add more logic to StoreVisualX() add let this
extra logic apply everywhere automatically.
This commit is contained in:
Dmytro Maluka
2024-10-13 17:46:34 +02:00
parent d60413f03c
commit 85afb6eb87
4 changed files with 7 additions and 7 deletions

View File

@@ -107,7 +107,7 @@ function commentLine(bp, lineN, indentLen)
bp.Cursor.Y = curpos.Y
end
bp.Cursor:Relocate()
bp.Cursor.LastVisualX = bp.Cursor:GetVisualX()
bp.Cursor:StoreVisualX()
end
function uncommentLine(bp, lineN, commentRegex)
@@ -135,7 +135,7 @@ function uncommentLine(bp, lineN, commentRegex)
end
end
bp.Cursor:Relocate()
bp.Cursor.LastVisualX = bp.Cursor:GetVisualX()
bp.Cursor:StoreVisualX()
end
function toggleCommentLine(bp, lineN, commentRegex)