From a14bc7fc72f81fa2211196edaa9c39c359e33e3b Mon Sep 17 00:00:00 2001 From: groverlynn Date: Mon, 25 Sep 2023 03:38:59 +0200 Subject: [PATCH] fix terminal non-inline --- SquirrelPanel.m | 14 +++++++++----- data/squirrel.yaml | 1 - librime | 2 +- plum | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/SquirrelPanel.m b/SquirrelPanel.m index 892471dd4..4a4aa2ba3 100644 --- a/SquirrelPanel.m +++ b/SquirrelPanel.m @@ -961,28 +961,32 @@ - (void)initializeUIStyleForDarkMode:(BOOL)isDark { NSColor *secondaryTextColor = [[self class] secondaryTextColor]; - NSMutableDictionary *attrs = [[NSMutableDictionary alloc] init]; + NSMutableDictionary *defaultAttrs = [[NSMutableDictionary alloc] init]; + // solve terminal hijack when non-inline + defaultAttrs[IMKCandidatesSendServerKeyEventFirst] = @(YES); + + NSMutableDictionary *attrs = [defaultAttrs mutableCopy]; attrs[NSForegroundColorAttributeName] = [NSColor controlTextColor]; attrs[NSFontAttributeName] = [NSFont userFontOfSize:kDefaultFontSize]; - NSMutableDictionary *highlightedAttrs = [[NSMutableDictionary alloc] init]; + NSMutableDictionary *highlightedAttrs = [defaultAttrs mutableCopy]; highlightedAttrs[NSForegroundColorAttributeName] = [NSColor selectedControlTextColor]; highlightedAttrs[NSFontAttributeName] = [NSFont userFontOfSize:kDefaultFontSize]; NSMutableDictionary *labelAttrs = [attrs mutableCopy]; NSMutableDictionary *labelHighlightedAttrs = [highlightedAttrs mutableCopy]; - NSMutableDictionary *commentAttrs = [[NSMutableDictionary alloc] init]; + NSMutableDictionary *commentAttrs = [defaultAttrs mutableCopy]; commentAttrs[NSForegroundColorAttributeName] = secondaryTextColor; commentAttrs[NSFontAttributeName] = [NSFont userFontOfSize:kDefaultFontSize]; NSMutableDictionary *commentHighlightedAttrs = [commentAttrs mutableCopy]; - NSMutableDictionary *preeditAttrs = [[NSMutableDictionary alloc] init]; + NSMutableDictionary *preeditAttrs = [defaultAttrs mutableCopy]; preeditAttrs[NSForegroundColorAttributeName] = secondaryTextColor; preeditAttrs[NSFontAttributeName] = [NSFont userFontOfSize:kDefaultFontSize]; - NSMutableDictionary *preeditHighlightedAttrs = [[NSMutableDictionary alloc] init]; + NSMutableDictionary *preeditHighlightedAttrs = [defaultAttrs mutableCopy]; preeditHighlightedAttrs[NSForegroundColorAttributeName] = [NSColor controlTextColor]; preeditHighlightedAttrs[NSFontAttributeName] = [NSFont userFontOfSize:kDefaultFontSize]; diff --git a/data/squirrel.yaml b/data/squirrel.yaml index 71c4fb8df..54fd985d9 100644 --- a/data/squirrel.yaml +++ b/data/squirrel.yaml @@ -341,7 +341,6 @@ app_options: com.apple.Terminal: ascii_mode: true no_inline: true - inline_placeholder: true com.googlecode.iterm2: ascii_mode: true no_inline: true diff --git a/librime b/librime index 8911db66b..c940fdd85 160000 --- a/librime +++ b/librime @@ -1 +1 @@ -Subproject commit 8911db66b0e5d43c2c3e47ffec06bfd10201daae +Subproject commit c940fdd852e867b09f97bfd8684ab1e97398f54b diff --git a/plum b/plum index 3d06432dd..6f502ff6f 160000 --- a/plum +++ b/plum @@ -1 +1 @@ -Subproject commit 3d06432dda5fd1738bebda298c574b6ed2d512d8 +Subproject commit 6f502ff6fa87789847fa18200415318e705bffa4