Skip to content

Commit

Permalink
fix terminal non-inline
Browse files Browse the repository at this point in the history
  • Loading branch information
groverlynn committed Sep 25, 2023
1 parent 9a13c72 commit 256247a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
14 changes: 9 additions & 5 deletions SquirrelPanel.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down
1 change: 0 additions & 1 deletion data/squirrel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 256247a

Please sign in to comment.