Closed tremby closed 7 years ago
Merging #93 into master will increase coverage by
0.44%
. The diff coverage is80%
.
@@ Coverage Diff @@
## master #93 +/- ##
==========================================
+ Coverage 53.57% 54.01% +0.44%
==========================================
Files 50 51 +1
Lines 1749 1779 +30
==========================================
+ Hits 937 961 +24
- Misses 790 796 +6
Partials 22 22
Impacted Files | Coverage Δ | |
---|---|---|
commands/command.go | 65.45% <ø> (ø) |
:arrow_up: |
options/defaults.go | 0% <ø> (ø) |
:arrow_up: |
commands/viewport.go | 80% <80%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update fefe1b0...97701dc. Read the comment docs.
The problem here is that the views.ViewPort
object is passed by value, and so the connection to the original object is lost. By returning a pointer in GetViewport
, this problem is solved.
However, I would strongly prefer that the viewport object is kept private, and that a Scroll
method (or similar) is exposed instead. Please see the upstream feature/viewport-commands.
Nice! OK, I'll finish this off soon.
If you have a moment, can you show me how I would have fixed my own code?
(I understand that it's better to keep it private instead, I just want to explicitly see what I was doing wrong.)
Ready for review!
Thanks for the help.
I believe I have this working correctly both with center
on and off, by the way. It works just like vim (where the equivalent of center
is scrolloff=999
) in all cases I've tried other than at the very bottom (vim lets you keep scrolling and gives you ~
lines).
This is for #65.
I've become stuck. @ambientsound, any chance you can take a look and help me figure out why this isn't working?