Commit 8737faa1 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Do not hide console output when pressing : after a command

Normally, pressing ':' after executing a command would hide the console
(equivalent behavior to Escape or Enter). Now, : will focus the
commandline while keeping the previous output visible. This makes it
easier to compose a new command based on a todo shown in the previous
output (for example perform an 'ls' and then a 'dep' with IDs
afterwards).

Escape and Enter still have the same behavior, which can be used to
dismiss the last output.
parent d91512fc
0.12 (to be released)
---------------------
* Change: output in column UI remains visible when : is pressed (instead of
Enter or Escape to discard).
0.11
----
......@@ -27,8 +33,6 @@
large todo lists.
* Change: temporary files (for editing) will be detected as todo.txt files by
the todo.txt-vim plugin.
* Change: output in column UI remains visible when : is pressed (instead of
Enter or Escape to discard).
0.10.1
------
......
......@@ -142,9 +142,10 @@ class UIApplication(CLIApplicationBase):
self._execute_handler)
def hide_console(p_focus_commandline=False):
self._console_visible = False
if p_focus_commandline:
self._focus_commandline()
else:
self._console_visible = False
urwid.connect_signal(self.console, 'close', hide_console)
# view widget
......@@ -261,6 +262,7 @@ class UIApplication(CLIApplicationBase):
Executes a command, given as a string.
"""
p_output = p_output or self._output
self._console_visible = False
self._last_cmd = (p_command, p_output == self._output)
......@@ -329,6 +331,7 @@ class UIApplication(CLIApplicationBase):
self._update_all_columns()
def _blur_commandline(self):
self._console_visible = False
self.mainwindow.focus_item = 0
def _focus_commandline(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment