Repository navigation
[6024] 修复超长文档大纲侧边栏跳转后续章节时光标丢失且方向键无法移动的问题 - #4734
Merged
Merged
Conversation
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
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.
任务背景
在极限超长文档(如 vol05.stem)加载时,后台渐进式排版引擎逐步推进。当用户在左侧大纲侧边栏搜索并点击尚未排版的后续章节条目(例如第八十九节)时,由于此前 Scheme 层简单降级跳转至前沿节点且计算出了非法叶子路径,导致 C++ 底层 find_check_cursor 失败、光标无效,进而使得正文编辑区光标丢失且键盘方向键(Down)完全无法移动。
改动内容
TeXmacs/progs/text/text-outline.scm):outline-fallback-path),对于叶子文本节点不再错误追加多余子节点索引0。src/Edit/Interface/edit_cursor.cpp):start (et, ...)和correct_cursor确保目标路径合法且cu->valid始终为真。src/Plugins/Qt/qt_tm_widget.cpp):this和main_widget发送键盘焦点并直接激活canvas(),恢复方向键下移导航能力。验证
6024.py:--reproduce);diff_89 > 0,Down 键顺畅下移);xmake r 6013/xmake r 6004零报错全部通过。