From e13c34c2b844b71286d0252adb16dc068a5b5793 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 12 Oct 2021 09:13:06 +0530 Subject: [PATCH] Use a bar cursor for LineEdit --- kittens/tui/line_edit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kittens/tui/line_edit.py b/kittens/tui/line_edit.py index 4de7a7099..edefdbb70 100644 --- a/kittens/tui/line_edit.py +++ b/kittens/tui/line_edit.py @@ -7,7 +7,9 @@ from typing import Callable, Tuple from kitty.fast_data_types import truncate_point_for_length, wcswidth from kitty.key_encoding import EventType, KeyEvent -from .operations import RESTORE_CURSOR, SAVE_CURSOR, move_cursor_by +from .operations import ( + RESTORE_CURSOR, SAVE_CURSOR, move_cursor_by, set_cursor_shape +) class LineEdit: @@ -48,6 +50,7 @@ class LineEdit: write('\r') if cursor_pos: write(move_cursor_by(cursor_pos, 'right')) + write(set_cursor_shape('bar')) def add_text(self, text: str) -> None: if self.current_input: