1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-05-04 07:34:03 +02:00

Fix missing offset adjusting

This issue was found by property test
This commit is contained in:
Alex Plate 2025-03-04 18:46:34 +02:00
parent 2c7b966ec2
commit cda85ae534
No known key found for this signature in database
GPG Key ID: 0B97153C8FFEC09F

View File

@ -49,7 +49,9 @@ abstract class VimMotionGroupBase : VimMotionGroup {
editor.mode.isEndAllowedIgnoringOnemore,
)
val newPos = VimVisualPosition(line, normalisedColumn, false)
return editor.visualPositionToOffset(newPos).toAdjustedMotionOrError(intendedColumn)
val newOffset = editor.visualPositionToOffset(newPos)
val adjustedOffset = editor.normalizeOffset(newOffset, editor.isEndAllowed)
return adjustedOffset.toAdjustedMotionOrError(intendedColumn)
}
if (line < 0) {