Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Sources/Runestone/TextView/Navigation/TextLocation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ public struct TextLocation: Hashable, Equatable {
/// Column in the line.
public let column: Int

/// Initializes TextLocation from the given line and column
public init (lineNumber: Int, column: Int) {
self.lineNumber = lineNumber
self.column = column
}

init(_ linePosition: LinePosition) {
self.lineNumber = linePosition.row
self.column = linePosition.column
Expand Down