Fix requesting data from clipboard via OSC 52 getting it from primary selection instead

Fixes #7213
This commit is contained in:
Kovid Goyal
2024-03-13 09:43:28 +05:30
parent 04f8cb6d30
commit 5a9cf82564
2 changed files with 6 additions and 1 deletions

View File

@@ -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')