Use same co-ord system for cursor as in KITTY_PIPE_DATA

This commit is contained in:
Kovid Goyal 2021-05-09 08:11:05 +05:30
parent 9a6c2aa1ea
commit 80c13fa75b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 4 deletions

View File

@ -75,10 +75,10 @@ the command line:
replaced by the number of lines kitty is currently scrolled by replaced by the number of lines kitty is currently scrolled by
``@cursor-x`` ``@cursor-x``
replaced by the current cursor x position replaced by the current cursor x position with 1 being the leftmost cell
``@cursor-y`` ``@cursor-y``
replaced by the current cursor y position replaced by the current cursor y position with 1 being the topmost cell
For example:: For example::

View File

@ -324,9 +324,9 @@ def launch(
if x == '@scrolled-by': if x == '@scrolled-by':
x = str(screen.scrolled_by) x = str(screen.scrolled_by)
elif x == '@cursor-x': elif x == '@cursor-x':
x = str(screen.cursor.x) x = str(screen.cursor.x + 1)
elif x == '@cursor-y': elif x == '@cursor-y':
x = str(screen.cursor.y) x = str(screen.cursor.y + 1)
final_cmd.append(x) final_cmd.append(x)
exe = find_exe(final_cmd[0]) exe = find_exe(final_cmd[0])
if not exe: if not exe: