From 80c13fa75bbfeff84abd4b7f2bbde469acdb28f1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 9 May 2021 08:11:05 +0530 Subject: [PATCH] Use same co-ord system for cursor as in KITTY_PIPE_DATA --- docs/launch.rst | 4 ++-- kitty/launch.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/launch.rst b/docs/launch.rst index f7ea54205..510979641 100644 --- a/docs/launch.rst +++ b/docs/launch.rst @@ -75,10 +75,10 @@ the command line: replaced by the number of lines kitty is currently scrolled by ``@cursor-x`` - replaced by the current cursor x position + replaced by the current cursor x position with 1 being the leftmost cell ``@cursor-y`` - replaced by the current cursor y position + replaced by the current cursor y position with 1 being the topmost cell For example:: diff --git a/kitty/launch.py b/kitty/launch.py index 064a2eee5..a8860833b 100644 --- a/kitty/launch.py +++ b/kitty/launch.py @@ -324,9 +324,9 @@ def launch( if x == '@scrolled-by': x = str(screen.scrolled_by) elif x == '@cursor-x': - x = str(screen.cursor.x) + x = str(screen.cursor.x + 1) elif x == '@cursor-y': - x = str(screen.cursor.y) + x = str(screen.cursor.y + 1) final_cmd.append(x) exe = find_exe(final_cmd[0]) if not exe: