 		guard !ignoreTextStorageNotifications else { return }
 		ignoreTextStorageNotifications = true
 		defer { ignoreTextStorageNotifications = false }
-		let range = textStorage.string.fullNSRange
-		parser?.parseAndAttribute(attributedString: textStorage, docType: context!.docType, inRange: range, makeChunks: true)
-		highlight(attributedString: textStorage, inRange: range)
+		contentsChanged(textStorage, range: editedRange, changeLength: delta)
 	}
 }
 

		willChangeValue(forKey: "canExecute")
		didChangeValue(forKey: "canExecute")
	}
}

// MARK: Actions

extension BaseSourceEditorController: NSTextViewDelegate {
	func undoManager(for view: NSTextView) -> UndoManager? {
		if let currentDocument = context?.currentDocument.value {
			Log.info("undoManager asked for with no current document", .app)
			return currentDocument.undoManager
		}
		return editor?.undoManager
	}
	
