Fixed a bug when paging the summary.
This commit is contained in:
parent
acfc0249f4
commit
8ecd50848d
2 changed files with 6 additions and 10 deletions
4
BUGS
4
BUGS
|
|
@ -6,8 +6,6 @@ Current
|
||||||
the timed out status when un-paused.
|
the timed out status when un-paused.
|
||||||
- Tmp files are being left behind after shutdown.
|
- Tmp files are being left behind after shutdown.
|
||||||
- All tools in AppImages aren't working correctly. See ./vigil --self_test
|
- All tools in AppImages aren't working correctly. See ./vigil --self_test
|
||||||
- When paging the summary window the cursor line should stay in the same
|
|
||||||
place on the screen.
|
|
||||||
- Sometimes git_blame produces an error, depending on characters in its
|
- Sometimes git_blame produces an error, depending on characters in its
|
||||||
input.
|
input.
|
||||||
|
|
||||||
|
|
@ -252,6 +250,8 @@ Fixed
|
||||||
is a glitch in the scrolling.
|
is a glitch in the scrolling.
|
||||||
- When paging the summary window, with the bottom scroll bar showing, the
|
- When paging the summary window, with the bottom scroll bar showing, the
|
||||||
cursor line drifts up or down a row.
|
cursor line drifts up or down a row.
|
||||||
|
- When paging the summary window the cursor line should stay in the same
|
||||||
|
place on the screen.
|
||||||
|
|
||||||
|
|
||||||
Won't fix
|
Won't fix
|
||||||
|
|
|
||||||
|
|
@ -336,7 +336,7 @@ class Summary:
|
||||||
return self._highlight_cursor_row(
|
return self._highlight_cursor_row(
|
||||||
self._view_widget.appearance(dimensions), cursor_y)
|
self._view_widget.appearance(dimensions), cursor_y)
|
||||||
|
|
||||||
def mouse_scroll(self, dx, dy):
|
def scroll(self, dx, dy):
|
||||||
scroll_x, scroll_y = self._view_widget.position
|
scroll_x, scroll_y = self._view_widget.position
|
||||||
dy = min(dy, scroll_y)
|
dy = min(dy, scroll_y)
|
||||||
self._view_widget.position = scroll_x, scroll_y - dy
|
self._view_widget.position = scroll_x, scroll_y - dy
|
||||||
|
|
@ -375,15 +375,11 @@ class Summary:
|
||||||
|
|
||||||
def cursor_page_up(self):
|
def cursor_page_up(self):
|
||||||
view_width, view_height = self._view_widget.portal.last_dimensions
|
view_width, view_height = self._view_widget.portal.last_dimensions
|
||||||
x, y = self._cursor_position
|
self.scroll(0, view_height)
|
||||||
jump = view_height - 1
|
|
||||||
self._cursor_position = (x, max(y - jump, 0))
|
|
||||||
|
|
||||||
def cursor_page_down(self):
|
def cursor_page_down(self):
|
||||||
view_width, view_height = self._view_widget.portal.last_dimensions
|
view_width, view_height = self._view_widget.portal.last_dimensions
|
||||||
x, y = self._cursor_position
|
self.scroll(0, -view_height)
|
||||||
jump = view_height - 1
|
|
||||||
self._cursor_position = (x, min(y + jump, len(self._column) - 1))
|
|
||||||
|
|
||||||
def cursor_home(self):
|
def cursor_home(self):
|
||||||
x, y = self._cursor_position
|
x, y = self._cursor_position
|
||||||
|
|
@ -796,7 +792,7 @@ class Screen:
|
||||||
last_x, last_y = self._last_mouse_position
|
last_x, last_y = self._last_mouse_position
|
||||||
dx, dy = x - last_x, y - last_y
|
dx, dy = x - last_x, y - last_y
|
||||||
if self._is_summary_focused:
|
if self._is_summary_focused:
|
||||||
self._summary.mouse_scroll(dx, dy)
|
self._summary.scroll(dx, dy)
|
||||||
else:
|
else:
|
||||||
self._move_listing((-dx, -dy))
|
self._move_listing((-dx, -dy))
|
||||||
else: # Mouse press
|
else: # Mouse press
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue