feat(编辑转换): 增强PDF转换与编辑体验
build.yaml / build (push) Successful in 41s

This commit is contained in:
xiaoqidun committed 2026-09-26 21:36:19 +08:00
1 parent 4fa65175bc
commit f234d4ad10
20 files changed
+1761 -105

No files matched your search

+2 -2
View File
@@ -35,7 +35,7 @@ func (e *Editor) Transaction(edit func(*Editor) error) error {
}
changed := e.revision != before.revision
e.history, e.historyIndex, e.historyLimit = before.history, before.historyIndex, before.historyLimit
e.backends, e.fontFS = before.backends, before.fontFS
e.backends, e.fontDirs, e.fontFS = before.backends, before.fontDirs, before.fontFS
e.fontRenderer, e.fontMetrics = before.fontRenderer, before.fontMetrics
if changed {
e.serial, e.revision = before.serial, before.revision
@@ -83,7 +83,7 @@ func (e *Editor) restoreTransaction(state Editor) {
maps.Copy(state.resourceID, e.resourceID)
state.history, state.historyIndex, state.historyLimit = e.history, e.historyIndex, e.historyLimit
state.serial, state.maxID = max(e.serial, state.serial), max(e.maxID, state.maxID)
state.backends, state.fontFS = e.backends, e.fontFS
state.backends, state.fontDirs, state.fontFS = e.backends, e.fontDirs, e.fontFS
state.fontRenderer, state.fontMetrics = e.fontRenderer, e.fontMetrics
*e = state
}