From 492d823d4a5f4507c9a368e75cf17c2937fb77d3 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Wed, 25 Sep 2024 15:10:19 +0100 Subject: [PATCH] superfluous --- src/textual/widgets/_tree.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/textual/widgets/_tree.py b/src/textual/widgets/_tree.py index 12b2ee704c..ed0ae7a5d6 100644 --- a/src/textual/widgets/_tree.py +++ b/src/textual/widgets/_tree.py @@ -940,8 +940,6 @@ def move_cursor_to_line(self, line: int, animate=False) -> None: Raises: IndexError: If the line doesn't exist. """ - if line < 0: - line = len(self._tree_lines) + line try: node = self._tree_lines[line].node except IndexError: