Skip to content

Commit

Permalink
No need to set view_position in constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenburns committed Oct 17, 2022
1 parent 530b131 commit 4f812f9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/textual/widgets/_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class Input(Widget, can_focus=True):
cursor_blink = reactive(True)
value = reactive("", layout=True, init=False)
input_scroll_offset = reactive(0)
cursor_position = reactive(0, init=False)
cursor_position = reactive(0)
view_position = reactive(0)
placeholder = reactive("")
complete = reactive("")
Expand All @@ -118,7 +118,6 @@ def __init__(
self.placeholder = placeholder
self.highlighter = highlighter
self.password = password
self.view_position = 0

def _position_to_cell(self, position: int) -> int:
"""Convert an index within the value to cell position."""
Expand Down

0 comments on commit 4f812f9

Please sign in to comment.