Repository navigation
diag(core): 丢弃记录带上差异文本 (#194) - #288
Merged
Merged
Conversation
This was referenced Oct 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
内容
selection-discard.jsonl的每条记录补上实际差异文本:{"reason":"row-text-changed","row":0,"saved_bytes":11,"current_bytes":29, "saved_columns":54,"current_columns":54,"saved_text":"…","current_text":"…","t_ms":…}改动
experiments/core/text_selection.hppDiscardReport新增saved_text/current_text,在row-text-changed分支填入(各取前 48 字节)experiments/shell/shell.cpp\xNN)为什么
此前只能看到长度差(11→29 或 23→17),无法判断是"重绘写了半行"还是"内容真的换了"。#194 的修法选择(先排空 / 识别吸收)取决于这个区别:如果
current_text是saved_text的前缀,就是部分重绘;如果不是,则是内容替换。验证
termforge_shell构建通过;experiments.shell.test_selection_context→ 8 tests OK(skipped=1)。边界
Refs #194