Skip to content

Commit 956eb9d

Browse files
committed
Adds default offset
1 parent 678ccb9 commit 956eb9d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/Runestone/TextView/Navigation/NavigationLocationFactories/ConsiderateLineNavigationLocationFactory.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ final class ConsiderateLineNavigationLocationFactory {
4343
self.lineControllerStorage = lineControllerStorage
4444
}
4545

46-
func location(movingFrom location: Int, byLineCount offset: Int, inDirection direction: TextDirection) -> Int {
46+
func location(movingFrom location: Int, byLineCount offset: Int = 1, inDirection direction: TextDirection) -> Int {
4747
if let previousOperation {
4848
let directionedOffset = DirectionedOffset(offset: offset, inDirection: direction)
4949
let newDirectionedOffset = previousOperation.offset + directionedOffset

0 commit comments

Comments
 (0)