mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Fix timing to invalidate editor style
This commit is contained in:
parent
e06aeae566
commit
fe76987c5a
@ -5,6 +5,10 @@ Change Log
|
||||
4.5.3 (unreleased)
|
||||
--------------------------
|
||||
|
||||
### Fixes
|
||||
|
||||
- Fix an issue that the editor font did not applied to documents created via Services.
|
||||
|
||||
|
||||
|
||||
4.5.2 (562)
|
||||
|
@ -245,10 +245,16 @@ final class DocumentController: NSDocumentController {
|
||||
@discardableResult
|
||||
func openUntitledDocument(content: String, title: String? = nil, display displayDocument: Bool) throws -> Document {
|
||||
|
||||
let document = try self.transientDocument ?? (try self.openUntitledDocumentAndDisplay(displayDocument) as! Document)
|
||||
let document = try self.transientDocument ?? (try self.openUntitledDocumentAndDisplay(false) as! Document)
|
||||
|
||||
document.replaceContent(with: content)
|
||||
document.updateChangeCount(.changeDone)
|
||||
|
||||
if displayDocument {
|
||||
document.makeWindowControllers()
|
||||
document.showWindows()
|
||||
}
|
||||
|
||||
if let title {
|
||||
document.displayName = title
|
||||
document.windowControllers
|
||||
|
Loading…
Reference in New Issue
Block a user