Skip to content

Commit 5afd711

Browse files
committed
docs: record the continuous toolbar application change
1 parent edac39e commit 5afd711

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
## 4.3.0 (TBD)
22

3+
- Bug Fixes
4+
- Fixed an intermittent bottom toolbar flicker when running a command. The toolbar's
5+
prompt-toolkit application now stays running across both the prompt and command execution
6+
instead of stopping and restarting for each one, since prompt-toolkit drops the bottom toolbar
7+
from the final frame of every application run.
38
- Enhancements
49
- `enable_bottom_toolbar=True` now keeps the toolbar visible and refreshing during command
510
execution

‎cmd2/cmd2.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2074,9 +2074,10 @@ def get_bottom_toolbar(self) -> AnyFormattedText:
20742074
your application. This could be information like the application name, current state,
20752075
or even a real-time clock.
20762076
2077-
During command execution this callback runs in a background UI thread. Protect shared
2078-
state with a lock when necessary. The built-in pager shares this toolbar. It is suspended
2079-
while another prompt, external pager, or interactive shell owns the terminal.
2077+
Inside the command loop this callback runs in a background UI thread, at the prompt as
2078+
well as during command execution, because a single application renders both. Protect
2079+
shared state with a lock when necessary. The built-in pager shares this toolbar. It is
2080+
suspended while another prompt, external pager, or interactive shell owns the terminal.
20802081
20812082
:return: Content to populate the bottom toolbar.
20822083
"""

‎docs/features/prompt.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,9 @@ See the
109109
example for a demonstration of this technique. Run its `work 5` command to see the clock update
110110
while the command prints output.
111111

112-
During command execution, `get_bottom_toolbar()` runs in a background UI thread. Keep the callback
113-
fast and use a lock when reading state that a command or another thread modifies.
112+
Inside the command loop, `get_bottom_toolbar()` runs in a background UI thread, at the prompt as
113+
well as during command execution, because a single prompt-toolkit application renders both. Keep the
114+
callback fast and use a lock when reading state that a command or another thread modifies.
114115

115116
### Commands That Take Over the Terminal
116117

0 commit comments

Comments
 (0)