Merge branch '4.8.7'

This commit is contained in:
1024jp 2024-06-26 21:03:04 +09:00
commit 55ede83624
7 changed files with 20 additions and 21 deletions

View File

@ -42,9 +42,15 @@
4.8.7 (unreleased)
--------------------------
### Improvements
- Update the Lisp, Lua, Scheme, and Tcl syntaxes to update interpreters (thanks to Renfei!).
### Fixes
- Fix the view layout in the Quick Action bar.
- Fix a potential memory leak.

View File

@ -411,10 +411,12 @@ final class DocumentViewController: NSSplitViewController, ThemeChanging, NSTool
let textStorage = notification.object as! NSTextStorage
guard
textStorage.editedMask.contains(.editedCharacters),
self.focusedTextView?.hasMarkedText() != true
else { return }
guard textStorage.editedMask.contains(.editedCharacters) else { return }
// give up the current parsing
self.document.syntaxParser.cancel()
guard self.focusedTextView?.hasMarkedText() != true else { return }
self.document.counter.invalidateContent()
self.outlineParseDebouncer.schedule()

View File

@ -24,7 +24,6 @@
// limitations under the License.
//
import Combine
import Foundation
import AppKit.NSTextStorage
import OSLog
@ -59,8 +58,6 @@ final class SyntaxParser: @unchecked Sendable {
private var highlightParseTask: Task<Void, any Error>?
private var isHighlighting = false
private var textEditingObserver: AnyCancellable?
// MARK: Lifecycle
@ -70,12 +67,6 @@ final class SyntaxParser: @unchecked Sendable {
self.textStorage = textStorage
self.syntax = syntax
self.name = name
// give up if the string is changed while parsing
self.textEditingObserver = NotificationCenter.default.publisher(for: NSTextStorage.willProcessEditingNotification, object: textStorage)
.map { $0.object as! NSTextStorage }
.filter { $0.editedMask.contains(.editedCharacters) }
.sink { [weak self] _ in self?.highlightParseTask?.cancel() }
}

View File

@ -45,9 +45,9 @@ metadata:
author: 1024jp
description: general Lisp syntax for common Lisp and other Lisp dialects
distributionURL: https://coteditor.com
lastModified: '2023-05-05'
lastModified: '2024-06-26'
license: Same as CotEditor
version: 1.2.0
version: 1.3.0
numbers:
- beginString: '#b[01][01_]*\b'
ignoreCase: true

View File

@ -304,9 +304,9 @@ kind: code
metadata:
author: 1024jp
distributionURL: https://coteditor.com
lastModified: '2023-05-05'
lastModified: '2024-06-26'
license: Same as CotEditor
version: 1.1.0
version: 1.2.0
numbers:
- beginString: 0[xX][0-9a-fA-F]+
regularExpression: true

View File

@ -405,9 +405,9 @@ metadata:
author: 1024jp
description: support R5RS and R6RS
distributionURL: https://coteditor.com
lastModified: '2023-05-05'
lastModified: '2024-06-26'
license: Same as CotEditor
version: 1.2.0
version: 1.3.0
numbers:
- beginString: '#[0-9a-f]+\b'
ignoreCase: true

View File

@ -1306,9 +1306,9 @@ metadata:
author: 1024jp
description: Support Tcl 8.6 / incl. Tcl and Tk commands
distributionURL: https://coteditor.com
lastModified: '2023-05-05'
lastModified: '2024-06-26'
license: Same as CotEditor
version: 1.1.0
version: 1.2.0
numbers:
- beginString: (?<![-_.[:alnum:]])\-?\d+(\.\d+)?\b
description: decimal