From 5a9cf825647c4d98b143dc855210ea2471392bce Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 13 Mar 2024 09:43:28 +0530 Subject: [PATCH] Fix requesting data from clipboard via OSC 52 getting it from primary selection instead Fixes #7213 --- docs/changelog.rst | 5 +++++ kitty/clipboard.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 8ae2cdd68..e1460103d 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -47,6 +47,11 @@ rsync algorithm to speed up repeated transfers of large files. Detailed list of changes ------------------------------------- +0.33.1 [future] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- Fix a regression in the previous release that caused requesting data from the clipboard via OSC 52 to instead return data from the primary selection (:iss:`7213`) + 0.33.0 [2024-03-12] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/clipboard.py b/kitty/clipboard.py index 033c73b03..f195eb87b 100644 --- a/kitty/clipboard.py +++ b/kitty/clipboard.py @@ -406,7 +406,7 @@ class ClipboardRequestManager: def parse_osc_52(self, data: memoryview, is_partial: bool = False) -> None: idx = find_in_memoryview(data, ord(b';')) if idx > -1: - where = str(data[idx:], "utf-8", 'replace') + where = str(data[:idx], "utf-8", 'replace') data = data[idx+1:] else: where = str(data, "utf-8", 'replace')