Skip to content

Commit a14bc7f

Browse files
committed
fix terminal non-inline
1 parent 9a13c72 commit a14bc7f

4 files changed

Lines changed: 11 additions & 8 deletions

File tree

SquirrelPanel.m

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -961,28 +961,32 @@ - (void)initializeUIStyleForDarkMode:(BOOL)isDark {
961961

962962
NSColor *secondaryTextColor = [[self class] secondaryTextColor];
963963

964-
NSMutableDictionary *attrs = [[NSMutableDictionary alloc] init];
964+
NSMutableDictionary *defaultAttrs = [[NSMutableDictionary alloc] init];
965+
// solve terminal hijack when non-inline
966+
defaultAttrs[IMKCandidatesSendServerKeyEventFirst] = @(YES);
967+
968+
NSMutableDictionary *attrs = [defaultAttrs mutableCopy];
965969
attrs[NSForegroundColorAttributeName] = [NSColor controlTextColor];
966970
attrs[NSFontAttributeName] = [NSFont userFontOfSize:kDefaultFontSize];
967971

968-
NSMutableDictionary *highlightedAttrs = [[NSMutableDictionary alloc] init];
972+
NSMutableDictionary *highlightedAttrs = [defaultAttrs mutableCopy];
969973
highlightedAttrs[NSForegroundColorAttributeName] = [NSColor selectedControlTextColor];
970974
highlightedAttrs[NSFontAttributeName] = [NSFont userFontOfSize:kDefaultFontSize];
971975

972976
NSMutableDictionary *labelAttrs = [attrs mutableCopy];
973977
NSMutableDictionary *labelHighlightedAttrs = [highlightedAttrs mutableCopy];
974978

975-
NSMutableDictionary *commentAttrs = [[NSMutableDictionary alloc] init];
979+
NSMutableDictionary *commentAttrs = [defaultAttrs mutableCopy];
976980
commentAttrs[NSForegroundColorAttributeName] = secondaryTextColor;
977981
commentAttrs[NSFontAttributeName] = [NSFont userFontOfSize:kDefaultFontSize];
978982

979983
NSMutableDictionary *commentHighlightedAttrs = [commentAttrs mutableCopy];
980984

981-
NSMutableDictionary *preeditAttrs = [[NSMutableDictionary alloc] init];
985+
NSMutableDictionary *preeditAttrs = [defaultAttrs mutableCopy];
982986
preeditAttrs[NSForegroundColorAttributeName] = secondaryTextColor;
983987
preeditAttrs[NSFontAttributeName] = [NSFont userFontOfSize:kDefaultFontSize];
984988

985-
NSMutableDictionary *preeditHighlightedAttrs = [[NSMutableDictionary alloc] init];
989+
NSMutableDictionary *preeditHighlightedAttrs = [defaultAttrs mutableCopy];
986990
preeditHighlightedAttrs[NSForegroundColorAttributeName] = [NSColor controlTextColor];
987991
preeditHighlightedAttrs[NSFontAttributeName] = [NSFont userFontOfSize:kDefaultFontSize];
988992

data/squirrel.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,6 @@ app_options:
341341
com.apple.Terminal:
342342
ascii_mode: true
343343
no_inline: true
344-
inline_placeholder: true
345344
com.googlecode.iterm2:
346345
ascii_mode: true
347346
no_inline: true

librime

Submodule librime updated 228 files

plum

Submodule plum updated 1 file

0 commit comments

Comments
 (0)