macOS: Fix regression in 0.47.0 that broke passing Cmd+C on to terminal applications when no text is selected

Fixes #10087
This commit is contained in:
Kovid Goyal
2026-05-29 07:47:29 +05:30
parent 74b80e9a29
commit d6b662e706
3 changed files with 11 additions and 1 deletions

View File

@@ -178,6 +178,8 @@ Detailed list of changes
- Allow dragging to move scrollbar after clicking on track when :opt:`scrollbar_jump_on_click` is enabled (:pull:`10085`) - Allow dragging to move scrollbar after clicking on track when :opt:`scrollbar_jump_on_click` is enabled (:pull:`10085`)
- macOS: Fix regression in 0.47.0 that broke passing :kbd:`Cmd+C` on to terminal applications when no text is selected (:iss:`10087`)
0.47.1 [2026-05-28] 0.47.1 [2026-05-28]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -3743,5 +3743,6 @@ class Boss:
def copy_or_noop(self) -> bool | None: def copy_or_noop(self) -> bool | None:
if w := self.active_window: if w := self.active_window:
return w.copy_or_noop() ans = w.copy_or_noop()
return ans
return True return True

View File

@@ -218,6 +218,13 @@ class Mappings:
# the shortcuts in the global menubar will have been bypassed so trigger them here # the shortcuts in the global menubar will have been bypassed so trigger them here
key_action = global_key_action key_action = global_key_action
else: else:
# 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:
for action in global_key_action:
if action.definition == 'copy_or_noop':
return False
return True return True
if key_action is None: if key_action is None:
if is_modifier_key(ev.key): if is_modifier_key(ev.key):