mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 14:46:03 +00:00
DRYer
This commit is contained in:
parent
f7f6df675f
commit
c19c614d9e
2 changed files with 14 additions and 20 deletions
|
|
@ -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{})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue