Skip to content

Commit 2d773ce

Browse files
committed
Add missing docstrings
1 parent f9c0aeb commit 2d773ce

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/textual/widgets/_input.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def cursor(cls, cursor_position: int) -> Selection:
6262

6363
@property
6464
def is_empty(self) -> bool:
65+
"""Return True if the selection is empty."""
6566
return self.start == self.end
6667

6768

@@ -209,10 +210,12 @@ class Input(ScrollView):
209210

210211
@property
211212
def cursor_position(self) -> int:
213+
"""The current position of the cursor, corresponding to the end of the selection."""
212214
return self.selection.end
213215

214216
@cursor_position.setter
215217
def cursor_position(self, position: int) -> None:
218+
"""Set the current position of the cursor."""
216219
self.selection = Selection.cursor(position)
217220

218221
selection: Reactive[Selection] = reactive(Selection.cursor(0))

0 commit comments

Comments
 (0)