diff options
-rwxr-xr-x | ranger/config/commands.py | 2 | ||||
-rw-r--r-- | ranger/gui/mouse_event.py | 4 | ||||
-rw-r--r-- | ranger/gui/widgets/browsercolumn.py | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py index 4d00b4c8..83cbed01 100755 --- a/ranger/config/commands.py +++ b/ranger/config/commands.py @@ -145,7 +145,7 @@ class cd(Command): rel_dest = self.rest(1) bookmarks = [v.path for v in self.fm.bookmarks.dct.values() - if rel_dest in v.path ] + if rel_dest in v.path] # expand the tilde into the user directory if rel_dest.startswith('~'): diff --git a/ranger/gui/mouse_event.py b/ranger/gui/mouse_event.py index bc05b2b7..0de3eea2 100644 --- a/ranger/gui/mouse_event.py +++ b/ranger/gui/mouse_event.py @@ -4,11 +4,11 @@ import curses class MouseEvent(object): - PRESSED = [ 0, + PRESSED = [0, curses.BUTTON1_PRESSED, curses.BUTTON2_PRESSED, curses.BUTTON3_PRESSED, - curses.BUTTON4_PRESSED ] + curses.BUTTON4_PRESSED] CTRL_SCROLLWHEEL_MULTIPLIER = 5 def __init__(self, getmouse): diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py index 62a09540..919a8f19 100644 --- a/ranger/gui/widgets/browsercolumn.py +++ b/ranger/gui/widgets/browsercolumn.py @@ -498,7 +498,7 @@ class BrowserColumn(Pager): return 0 if halfwinsize < offset: - return min( dirsize - winsize, max( 0, index - halfwinsize )) + return min(dirsize - winsize, max(0, index - halfwinsize)) if original > dirsize - winsize: self.target.scroll_begin = dirsize - winsize @@ -508,11 +508,11 @@ class BrowserColumn(Pager): return original if projected > upper_limit: - return min( dirsize - winsize, + return min(dirsize - winsize, original + (projected - upper_limit)) if projected < upper_limit: - return max( 0, + return max(0, original - (lower_limit - projected)) return original |