mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Fix the other invisibles setting update
This commit is contained in:
parent
895bfc6f91
commit
48d9e09a8b
@ -12,7 +12,9 @@ develop
|
||||
|
||||
### Fixes
|
||||
|
||||
- Fix a possible issue where application could crash when changing document's encoding lossy.
|
||||
- Fix a possible crash on changing document's encoding lossy.
|
||||
- Fix an issue where editor views didn't update after changing the visibility of the other invisible characters.
|
||||
|
||||
|
||||
|
||||
3.1.1 (174)
|
||||
|
@ -91,6 +91,8 @@ final class LayoutManager: NSLayoutManager {
|
||||
.showInvisibleTab,
|
||||
.showInvisibleNewLine,
|
||||
.showInvisibleFullwidthSpace,
|
||||
|
||||
.showOtherInvisibleChars,
|
||||
]
|
||||
|
||||
private var defaultLineHeight: CGFloat = 1.0
|
||||
@ -165,6 +167,10 @@ final class LayoutManager: NSLayoutManager {
|
||||
self.applyDefaultInvisiblesSetting()
|
||||
self.invisibleLines = self.generateInvisibleLines()
|
||||
|
||||
if keyPath == DefaultKeys.showOtherInvisibleChars.rawValue {
|
||||
self.invalidateLayout(forCharacterRange: self.attributedString().string.nsRange, actualCharacterRange: nil)
|
||||
}
|
||||
|
||||
if let textView = self.firstTextView {
|
||||
textView.setNeedsDisplay(textView.bounds, avoidAdditionalLayout: false)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user