mirror of
https://github.com/charmbracelet/glow
synced 2024-11-10 14:14:17 +00:00
Remove the bottom gap when closing the pager help whilst at the bottom
This commit is contained in:
parent
3b06c1fcd6
commit
3619ad137a
3 changed files with 6 additions and 3 deletions
2
go.mod
2
go.mod
|
@ -3,7 +3,7 @@ module github.com/charmbracelet/glow
|
|||
go 1.13
|
||||
|
||||
require (
|
||||
github.com/charmbracelet/bubbles v0.4.1-0.20200717223838-185a19e56f4e
|
||||
github.com/charmbracelet/bubbles v0.4.1-0.20200717232208-b130d9643487
|
||||
github.com/charmbracelet/bubbletea v0.10.0
|
||||
github.com/charmbracelet/charm v0.5.2
|
||||
github.com/charmbracelet/glamour v0.1.1-0.20200521150359-e859bb067c06
|
||||
|
|
4
go.sum
4
go.sum
|
@ -16,8 +16,8 @@ github.com/calmh/randomart v1.1.0 h1:evl+iwc10LXtHdMZhzLxmsCQVmWnkXs44SbC6Uk0Il8
|
|||
github.com/calmh/randomart v1.1.0/go.mod h1:DQUbPVyP+7PAs21w/AnfMKG5NioxS3TbZ2F9MSK/jFM=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/charmbracelet/bubbles v0.4.0/go.mod h1:yhk6OKN3haEO3i/vYQVrvbPamvOPo2dVavWfbpsuUjg=
|
||||
github.com/charmbracelet/bubbles v0.4.1-0.20200717223838-185a19e56f4e h1:CyQ3NgyqRyN45dgfvpn2x3bu6exBvLlg9hVCJMJToBE=
|
||||
github.com/charmbracelet/bubbles v0.4.1-0.20200717223838-185a19e56f4e/go.mod h1:yhk6OKN3haEO3i/vYQVrvbPamvOPo2dVavWfbpsuUjg=
|
||||
github.com/charmbracelet/bubbles v0.4.1-0.20200717232208-b130d9643487 h1:12MHTHjB26n5aVYw9NpJo2KTRFSn/UlpvlXNQW7aBuA=
|
||||
github.com/charmbracelet/bubbles v0.4.1-0.20200717232208-b130d9643487/go.mod h1:yhk6OKN3haEO3i/vYQVrvbPamvOPo2dVavWfbpsuUjg=
|
||||
github.com/charmbracelet/bubbletea v0.9.1-0.20200713153904-2f53eeb54b90/go.mod h1:wjGGC5pyYvpuls0so+w4Zv+aZQW7RoPvsi9UBcDlSl8=
|
||||
github.com/charmbracelet/bubbletea v0.10.0 h1:rzbxI+eWoVuQ3Z7wOlefmxGtcxYr46Lu0fqIKYCZg7s=
|
||||
github.com/charmbracelet/bubbletea v0.10.0/go.mod h1:wjGGC5pyYvpuls0so+w4Zv+aZQW7RoPvsi9UBcDlSl8=
|
||||
|
|
|
@ -135,6 +135,9 @@ func (m *pagerModel) setContent(s string) {
|
|||
func (m *pagerModel) toggleHelp() {
|
||||
m.showHelp = !m.showHelp
|
||||
m.setSize(m.width, m.height)
|
||||
if m.viewport.PastBottom() {
|
||||
m.viewport.GotoBottom()
|
||||
}
|
||||
}
|
||||
|
||||
func (m *pagerModel) unload() {
|
||||
|
|
Loading…
Reference in a new issue