This commit is contained in:
Kovid Goyal
2023-03-23 07:53:54 +05:30
parent f7f6df675f
commit c19c614d9e
2 changed files with 14 additions and 20 deletions

View File

@@ -144,7 +144,10 @@ type LogicalLines struct {
}
func (self *LogicalLines) At(i int) *LogicalLine { return self.lines[i] }
func (self *LogicalLines) Len() int { return len(self.lines) }
func (self *LogicalLines) ScreenLineAt(pos ScrollPos) string {
return self.lines[pos.logical_line].screen_lines[pos.screen_line]
}
func (self *LogicalLines) Len() int { return len(self.lines) }
func (self *LogicalLines) NumScreenLinesTo(a ScrollPos) (ans int) {
return self.Minus(a, ScrollPos{})