From 91f7fdad83b7a2ca2e58ba997cddb4e122dc76c1 Mon Sep 17 00:00:00 2001 From: Johan Walles Date: Sat, 26 Feb 2022 12:28:57 +0100 Subject: [PATCH] Fix more compile errors --- m/pager.go | 7 ------- m/screenLines.go | 4 ++++ m/scrollPosition.go | 4 ++++ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/m/pager.go b/m/pager.go index b3e50c8..06d15f9 100644 --- a/m/pager.go +++ b/m/pager.go @@ -359,13 +359,6 @@ func removeLastChar(s string) string { return s[:len(s)-size] } -func (p *Pager) scrollToEnd() { - p.scrollPosition = scrollPosition{ - lineNumberOneBased: p.reader.GetLineCount(), - // FIXME: Set deltaScreenLines as well so we're *really* at the end - } -} - func (p *Pager) onSearchKey(key twin.KeyCode) { switch key { case twin.KeyEscape, twin.KeyEnter: diff --git a/m/screenLines.go b/m/screenLines.go index 42f9432..6bfb8af 100644 --- a/m/screenLines.go +++ b/m/screenLines.go @@ -298,6 +298,10 @@ func createLinePrefix(fileLineNumber *int, numberPrefixLength int) []twin.Cell { return lineNumberPrefix } +func (p *Pager) getLastVisiblePosition() scrollPosition { + // FIXME: Compute this! +} + func (p *Pager) getLastVisibleLineNumberOneBased() int { // FIXME: Compute this! } diff --git a/m/scrollPosition.go b/m/scrollPosition.go index 73a6392..95d7b2f 100644 --- a/m/scrollPosition.go +++ b/m/scrollPosition.go @@ -185,3 +185,7 @@ func (p *Pager) deltaScreenLines() int { p.scrollPosition.internalDontTouch.canonicalize(p) return p.scrollPosition.internalDontTouch.deltaScreenLines } + +func (p *Pager) scrollToEnd() { + FIXME: Implement me! +}