mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 08:46:55 +08:00
feat(编辑能力): 统一字体隔离与保存处理
This commit is contained in:
1 parent
01b1740a83
commit
63e56c5ab8
2 files changed
+25
-158
No files matched your search
@@ -345,17 +345,9 @@ func (e *Editor) changeFontSnapshot(ctx context.Context, scan *editorFontDocumen
|
||||
}
|
||||
}
|
||||
changes[declaration.file.name] = data
|
||||
working := *scan.reader
|
||||
working.files = maps.Clone(scan.reader.files)
|
||||
next := *scan
|
||||
next.reader = &working
|
||||
if err := next.apply(ctx, changes); err != nil {
|
||||
if err := scan.apply(ctx, changes); err != nil {
|
||||
return false, err
|
||||
}
|
||||
if err := working.initRoot(); err != nil {
|
||||
return false, err
|
||||
}
|
||||
*scan.reader = working
|
||||
return true, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user