[1283] 修复启动页按下 Shift+方向键崩溃问题,改用 QShortcut 注册启动页标签快捷键 - #4522
Merged
Conversation
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.
What
修复启动页处于焦点时按下 Shift+方向键导致程序崩溃(SIGSEGV)的问题。
Why
QTMStartupTabWidget之前将键盘事件无差别转发给 Scheme 文本编辑器的key-press。Shift+方向键触发文本选区移动,但启动页没有文档排版盒,get_box()为空导致find_innermost_scroll空指针解引用崩溃。key-press机制。How
QTMStartupTabWidget的keyPressEvent/keyReleaseEventScheme 桥接。QShortcut注册启动页所需的标签页快捷键(Ctrl+T新建标签页、Ctrl+1~Ctrl+9切换标签页)。find_innermost_scroll中增加防御性判空。TeXmacs/tests/python/1283.py端到端自动化测试。