Use a bar cursor for LineEdit
This commit is contained in:
parent
8630c8830a
commit
e13c34c2b8
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user