Skip to content

Commit 8461d1f

Browse files
authored
Merge pull request #5822 from Textualize/f3fix
f3 fix
2 parents 0f24783 + 1df4fc4 commit 8461d1f

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/textual/_xterm_parser.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -260,14 +260,11 @@ def send_escape() -> None:
260260
# Check cursor position report
261261
cursor_position_match = _re_cursor_position.match(sequence)
262262
if cursor_position_match is not None:
263-
row, column = cursor_position_match.groups()
264-
# Cursor position report conflicts with f3 key
265-
# If it is a keypress, "row" will be 1, so ignore
266-
if int(row) != 1:
267-
x = int(column) - 1
268-
y = int(row) - 1
269-
on_token(events.CursorPosition(x, y))
270-
break
263+
row, column = map(int, cursor_position_match.groups())
264+
x = int(column) - 1
265+
y = int(row) - 1
266+
on_token(events.CursorPosition(x, y))
267+
break
271268

272269
# Was it a pressed key event that we received?
273270
key_events = list(sequence_to_key_events(sequence))

0 commit comments

Comments
 (0)