feat(渲染引擎): 修复裁剪并优化渲染
build.yaml / build (push) Successful in 42s

This commit is contained in:
xiaoqidun committed 2026-10-03 18:36:53 +08:00
1 parent aa1fcd4cd6
commit 54995fb60e
10 files changed
+62 -22

No files matched your search

+8 -1
View File
@@ -330,7 +330,14 @@ func (e *Editor) documentRoot() string {
// 返回: bool 是否为同一文档
func (e *Editor) sameDocument(other *Editor) bool {
if e.source == nil || other.source == nil {
return e.source == nil && other.source == nil
if e.source == nil && other.source == nil {
return true
}
fresh, packaged := e, other
if fresh.source != nil {
fresh, packaged = other, e
}
return len(packaged.source.reader.OFD.DocBody) == 1 && (packaged.source.fromNew || fresh.Info.DocID != "" && fresh.Info.DocID == packaged.source.info.DocID)
}
return e.documentRoot() == other.documentRoot() && e.source.info.DocID == other.source.info.DocID
}