Skip to content

Commit fdbd5df

Browse files
committed
feat(input): add cursor_at_start property
1 parent f3913c0 commit fdbd5df

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/textual/widgets/_input.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,11 @@ def _cursor_offset(self) -> int:
468468
offset += 1
469469
return offset
470470

471+
@property
472+
def cursor_at_start(self) -> bool:
473+
"""Flag to indicate if the cursor is at the start"""
474+
return self.cursor_position == 0
475+
471476
@property
472477
def cursor_at_end(self) -> bool:
473478
"""Flag to indicate if the cursor is at the end"""

0 commit comments

Comments
 (0)