Skip to content

Commit 700ae9e

Browse files
Fix: reset cursorshape correctly when application terminates.
1 parent 6ac867a commit 700ae9e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

prompt_toolkit/renderer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,8 @@ def reset(self, _scroll: bool = False, leave_alternate_screen: bool = True) -> N
416416
self.output.disable_bracketed_paste()
417417
self._bracketed_paste_enabled = False
418418

419+
self.output.reset_cursor_shape()
420+
419421
# NOTE: No need to set/reset cursor key mode here.
420422

421423
# Flush output. `disable_mouse_support` needs to write to stdout.
@@ -740,7 +742,6 @@ def erase(self, leave_alternate_screen: bool = True) -> None:
740742
output.erase_down()
741743
output.reset_attributes()
742744
output.enable_autowrap()
743-
output.reset_cursor_shape()
744745

745746
output.flush()
746747

0 commit comments

Comments
 (0)