diff --git a/CHANGELOG.md b/CHANGELOG.md index b684114..28f34de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,10 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - **Media type handlers** - open non-text files in another application (#121, #134) - Ability to set custom keybindings in config (#135) -- Pages have a scrollbar by default (#89, #107) +- Scrollbar, by default only appears on pages that go off-screen (#89, #107) ### Changed -- Update cview to `c34e0954618b8e697819f88391ff3a492e990cb6` for large performance and feature updates (#107) +- Update cview to `3bd98fd55f8718f0eded1186fa99fd242d330434` for large performance and feature updates (#107) - Update to tcell v2 (dependency of cview) ### Fixed @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Pages with ANSI resets don't use the terminal's default text and background colors (#107) - ANSI documents don't leak color into the left margin (#107) - Rendering very long documents is now ~96% faster, excluding gemtext parsing (#26, #107) +- Due to that same change, less memory is used per-page (#26, #107) ## [1.7.2] - 2020-12-21 diff --git a/display/display.go b/display/display.go index d33bf3a..92ab30f 100644 --- a/display/display.go +++ b/display/display.go @@ -87,7 +87,7 @@ func Init(version, commit, builtBy string) { // Overwrite all tabs with a new, differently sized, left margin // TODO: Should only the current tab's margin be changed, just like how // reformatPageAndSetView is only called for the current tab? - browser.SetTabItem(strconv.Itoa(i), makeContentLayout(tabs[i].view)) + browser.AddTab(strconv.Itoa(i), makeTabLabel(strconv.Itoa(i+1)), makeContentLayout(tabs[i].view)) if tabs[i] == t { // Reformat page ASAP, in the middle of loop reformatPageAndSetView(t, t.page) diff --git a/go.mod b/go.mod index fb4282d..45b7543 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.14 require ( github.com/dustin/go-humanize v1.0.0 github.com/fsnotify/fsnotify v1.4.9 // indirect - github.com/gdamore/tcell/v2 v2.1.0 + github.com/gdamore/tcell/v2 v2.1.1-0.20201225194624-29bb185874fd github.com/google/go-cmp v0.5.0 // indirect github.com/makeworld-the-better-one/go-gemini v0.11.0 github.com/makeworld-the-better-one/go-isemoji v1.1.0 @@ -21,7 +21,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.7.1 github.com/stretchr/testify v1.6.1 - gitlab.com/tslocum/cview v1.5.3-0.20201228180808-c34e0954618b + gitlab.com/tslocum/cview v1.5.3-0.20210105225340-3bd98fd55f87 golang.org/x/text v0.3.5-0.20201208001344-75a595aef632 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect gopkg.in/ini.v1 v1.62.0 // indirect @@ -30,5 +30,3 @@ require ( replace github.com/mmcdole/gofeed => github.com/makeworld-the-better-one/gofeed v1.1.1-0.20201123002655-c0c6354134fe replace github.com/schollz/progressbar/v3 => github.com/makeworld-the-better-one/progressbar/v3 v3.3.5-0.20201220005701-b036c4d38568 - -replace gitlab.com/tslocum/cview => gitlab.com/makeworld-the-better-one/cview v1.5.3-0.20210101054702-a6023214767d diff --git a/go.sum b/go.sum index be17aae..22c1e1b 100644 --- a/go.sum +++ b/go.sum @@ -51,8 +51,8 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko= github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg= github.com/gdamore/tcell/v2 v2.0.0-dev/go.mod h1:vSVL/GV5mCSlPC6thFP5kfOFdM9MGZcalipmpTxTgQA= -github.com/gdamore/tcell/v2 v2.1.0 h1:UnSmozHgBkQi2PGsFr+rpdXuAPRRucMegpQp3Z3kDro= -github.com/gdamore/tcell/v2 v2.1.0/go.mod h1:vSVL/GV5mCSlPC6thFP5kfOFdM9MGZcalipmpTxTgQA= +github.com/gdamore/tcell/v2 v2.1.1-0.20201225194624-29bb185874fd h1:66OLuRCaOFojnLK9eB0YTo8CU9AgHtfvBWvLsz/8r+I= +github.com/gdamore/tcell/v2 v2.1.1-0.20201225194624-29bb185874fd/go.mod h1:vSVL/GV5mCSlPC6thFP5kfOFdM9MGZcalipmpTxTgQA= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -232,10 +232,10 @@ github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69 github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/urfave/cli v1.22.3/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -gitlab.com/makeworld-the-better-one/cview v1.5.3-0.20210101054702-a6023214767d h1:LV3HpIaWzpLvq4pSQ84FGaY+VKHKr71nreh3vowf3k4= -gitlab.com/makeworld-the-better-one/cview v1.5.3-0.20210101054702-a6023214767d/go.mod h1:aXQjdMGBcA0t7wmEHIeW0tkbjKt1xFcX+ZFTWBZ0jdE= gitlab.com/tslocum/cbind v0.1.4 h1:cbZXPPcieXspk8cShoT6efz7HAT8yMNQcofYWNizis4= gitlab.com/tslocum/cbind v0.1.4/go.mod h1:RvwYE3auSjBNlCmWeGspzn+jdLUVQ8C2QGC+0nP9ChI= +gitlab.com/tslocum/cview v1.5.3-0.20210105225340-3bd98fd55f87 h1:XRU/t7k64vmr8OQXwMOpABS6e0mBh0KRLgCEuBkUryY= +gitlab.com/tslocum/cview v1.5.3-0.20210105225340-3bd98fd55f87/go.mod h1:YSkXKnSnbQ+xl2YWAJFRGqbap+UFvpVtKIsARod8tv0= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -316,8 +316,8 @@ golang.org/x/sys v0.0.0-20201013132646-2da7054afaeb/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201113135734-0a15ea8d9b02/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201223074533-0d417f636930 h1:vRgIt+nup/B/BwIS0g2oC0haq0iqbV3ZA+u6+0TlNCo= -golang.org/x/sys v0.0.0-20201223074533-0d417f636930/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210105210732-16f7687f5001 h1:/dSxr6gT0FNI1MO5WLJo8mTmItROeOKTkDn+7OwWBos= +golang.org/x/sys v0.0.0-20210105210732-16f7687f5001/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=