A new option to clear selections when they no longer reflect the contents of the clipboard

This commit is contained in:
Kovid Goyal
2025-03-12 11:41:27 +05:30
parent b34a88065b
commit 96d5c9c7c6
7 changed files with 37 additions and 1 deletions

View File

@@ -296,8 +296,10 @@ def linenum_handle_result(args: list[str], data: dict[str, Any], target_window_i
w.paste_bytes(text)
elif program == '@':
set_clipboard_string(text)
boss.handle_clipboard_loss('clipboard')
elif program == '*':
set_primary_selection(text)
boss.handle_clipboard_loss('primary')
elif program.startswith('@'):
boss.set_clipboard_buffer(program[1:], text)
else: