mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-19 23:37:13 +09:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user