mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 14:46:03 +00:00
Use a bar cursor for LineEdit
This commit is contained in:
parent
8630c8830a
commit
e13c34c2b8
1 changed files with 4 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue