Skip to content

Commit f2c7a15

Browse files
Fix cursor that remains in hidden state when application exits. (#1925)
When we have an application that doesn't show the cursor and `erase_when_done` is being used, the cursor remained hidden after the application terminated.
1 parent 435bd99 commit f2c7a15

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/prompt_toolkit/renderer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def get_max_column_index(row: dict[int, Char]) -> int:
257257
# give weird artifacts on resize events.)
258258
reset_attributes()
259259

260-
if screen.show_cursor or is_done:
260+
if screen.show_cursor:
261261
output.show_cursor()
262262

263263
return current_pos, last_style
@@ -416,6 +416,7 @@ def reset(self, _scroll: bool = False, leave_alternate_screen: bool = True) -> N
416416
self._bracketed_paste_enabled = False
417417

418418
self.output.reset_cursor_shape()
419+
self.output.show_cursor()
419420

420421
# NOTE: No need to set/reset cursor key mode here.
421422

0 commit comments

Comments
 (0)