Ensure we dont double copy
Some checks are pending
CI / Linux (python=3.13 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.11 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run

This commit is contained in:
Kovid Goyal 2026-05-29 07:52:38 +05:30
parent d6b662e706
commit 52b44f4f1a
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -221,9 +221,9 @@ class Mappings:
# On macOS copy_or_noop is mapped to Cmd+C by default and gets
# disabled when there is no copyable text so special case it
# and pass it on.
if is_macos:
if is_macos and (w := get_boss().active_window):
for action in global_key_action:
if action.definition == 'copy_or_noop':
if action.definition == 'copy_or_noop' and not w.screen.has_selection():
return False
return True
if key_action is None: