diff options
author | hut <hut@lepus.uberspace.de> | 2014-12-04 00:51:41 +0100 |
---|---|---|
committer | hut <hut@lepus.uberspace.de> | 2014-12-04 00:51:41 +0100 |
commit | b132301bc72351ad0baad92650cfc040112cafee (patch) | |
tree | c08c7e92add118a2cdffb7f4a8ad67452479bd08 /ranger/gui | |
parent | 987d618504ead0a099160c14855d8181500f3463 (diff) | |
download | ranger-b132301bc72351ad0baad92650cfc040112cafee.tar.gz |
ext.papermanager: redraw after using :paper* commands
Diffstat (limited to 'ranger/gui')
-rw-r--r-- | ranger/gui/widgets/browsercolumn.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py index 12523648..b2159339 100644 --- a/ranger/gui/widgets/browsercolumn.py +++ b/ranger/gui/widgets/browsercolumn.py @@ -248,10 +248,18 @@ class BrowserColumn(Pager): else: tagged_marker = " " + # Extract linemode-related information from the drawn object + paperinfo = None + use_linemode = drawn._linemode + if use_linemode == "papertitle": + paperinfo = self.fm.papermanager.get_paper_info(drawn.path) + if not paperinfo.title: + use_linemode = "filename" + key = (self.wid, selected_i == i, drawn.marked, self.main_column, drawn.path in copied, tagged_marker, drawn.infostring, drawn.vcsfilestatus, drawn.vcsremotestatus, self.fm.do_cut, - drawn._linemode) + use_linemode) if key in drawn.display_data: self.execute_curses_batch(line, drawn.display_data[key]) @@ -260,17 +268,11 @@ class BrowserColumn(Pager): # Deal with the line mode - paperinfo = None - use_linemode = drawn._linemode if use_linemode == "papertitle": - paperinfo = self.fm.papermanager.get_paper_info(drawn.path) - if paperinfo.title: - if paperinfo.year: - text = "%s - %s" % (paperinfo.year, paperinfo.title) - else: - text = paperinfo.title + if paperinfo.year: + text = "%s - %s" % (paperinfo.year, paperinfo.title) else: - use_linemode = "filename" + text = paperinfo.title if use_linemode == "filename": text = drawn.basename elif use_linemode == "permissions": |