diff options
author | siikamiika <siikamiika@users.noreply.github.com> | 2019-07-30 21:08:39 +0300 |
---|---|---|
committer | siikamiika <siikamiika@users.noreply.github.com> | 2019-07-30 21:08:39 +0300 |
commit | 05e7e2c502a07d9b38ca0c8f055445c38b10d049 (patch) | |
tree | 807fe71793dbc50d309c779b23f6317fe910e243 | |
parent | f953c1c29de70ed54e43629222a3a170b08a42ac (diff) | |
download | ranger-05e7e2c502a07d9b38ca0c8f055445c38b10d049.tar.gz |
store escape sequence in a constant for clarity
Escape character is also represented with octal notation to be consistent with prior usage
-rw-r--r-- | ranger/gui/ui.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py index 207061ce..38065182 100644 --- a/ranger/gui/ui.py +++ b/ranger/gui/ui.py @@ -20,6 +20,11 @@ from .mouse_event import MouseEvent MOUSEMASK = curses.ALL_MOUSE_EVENTS | curses.REPORT_MOUSE_POSITION +# This escape is not available with a capname from terminfo unlike +# tsl (to_status_line), so it's hardcoded here. It's used just like tsl, +# but it sets the icon title instead of the window title. +ESCAPE_ICON_TITLE = '\033]1;' + _ASCII = ''.join(chr(c) for c in range(32, 127)) @@ -389,7 +394,7 @@ class UI( # pylint: disable=too-many-instance-attributes,too-many-public-method self.settings.update_title, ), ( - '\x1b]1;', + ESCAPE_ICON_TITLE, self.settings.update_icon_title, ), ] |