Fix :scroll-perc 0/100 0.

This commit is contained in:
Florian Bruhin 2015-11-15 12:30:24 +01:00
parent 3d44d619fc
commit 7de206e350
2 changed files with 4 additions and 2 deletions

View File

@ -86,6 +86,7 @@ Fixed
`storage -> prompt-download-directory` was unset.
- Fixed crash when using `:follow-hint` outside of hint mode.
- Fixed crash when using `:set foo bar?` with invalid section/option.
- Fixed scrolling to the very left/right with `:scroll-perc`.
v0.4.1
------

View File

@ -164,9 +164,10 @@ class CommandDispatcher:
perc = 100
elif perc is None:
perc = count
if perc == 0:
if perc == 0 and orientation == Qt.Vertical:
self.scroll('top')
elif perc == 100:
elif perc == 100 and orientation == Qt.Vertical:
self.scroll('bottom')
else:
perc = qtutils.check_overflow(perc, 'int', fatal=False)