Fix typing text color in split views (fix #1055)

This commit is contained in:
1024jp 2020-05-17 12:50:35 +09:00
parent 52e56d3a95
commit 81415cc591
3 changed files with 6 additions and 1 deletions

View File

@ -10,6 +10,10 @@ Change Log
- [trivial] Omit surrogate pair code points in the character inspector if the chraracter consists of multiple Unicode characters.
### Fixes
- [beta.3] Fix an issue where the theme color was still not applied to the color of typed text in split view under some conditions.
3.9.0-beta.3 (415)
--------------------------

View File

@ -972,7 +972,6 @@ final class DocumentViewController: NSSplitViewController, SyntaxParserDelegate,
// copy textView states
if let baseTextView = baseViewController?.textView, let textView = editorViewController.textView {
textView.typingAttributes = baseTextView.typingAttributes
textView.font = baseTextView.font
textView.theme = baseTextView.theme
textView.tabWidth = baseTextView.tabWidth

View File

@ -1396,6 +1396,8 @@ final class EditorTextView: NSTextView, Themable, CurrentLineHighlighting, URLDe
if theme.text.color != self.textColor {
self.textColor = theme.text.color
}
// -> But, even in that case, you need to set typingAttribute anyway... (macOS 10.15)
self.typingAttributes[.foregroundColor] = theme.text.color
self.backgroundColor = theme.background.color
self.enclosingScrollView?.backgroundColor = theme.background.color