Merge pull request #3503 from dmaluka/spawcursorup-logical-lines

Revert `SpawnMultiCursor{Up,Down}` honoring softwrap + overhaul `LastVisualX` usage
This commit is contained in:
Dmytro Maluka
2024-10-20 21:26:59 +02:00
committed by GitHub
6 changed files with 46 additions and 50 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)

View File

@@ -21,7 +21,7 @@ function lines(b)
end
function vcol(b)
return tostring(b:GetActiveCursor():GetVisualX())
return tostring(b:GetActiveCursor():GetVisualX(false))
end
function bytes(b)