[221_3] 修复数学 tab cycling 菜单中 <lefttimesthree> 和 <righttimesthree> 显示异常#3122
[221_3] 修复数学 tab cycling 菜单中 <lefttimesthree> 和 <righttimesthree> 显示异常#3122
<lefttimesthree> 和 <righttimesthree> 显示异常#3122Conversation
Greptile Summary本 PR 修复了数学 tab cycling 菜单中 修复策略分两层:在 Confidence Score: 5/5可安全合并,剩余问题均为 P2 级改进建议 所有发现均为 P2 级别( TeXmacs/progs/kernel/gui/menu-widget.scm 第 871 行的
|
| Filename | Overview |
|---|---|
| TeXmacs/progs/kernel/gui/menu-widget.scm | 为 <lefttimesthree> / <righttimesthree> 增加 typeset 预览分支;调整颜色参数传递方式(字符串取代 color 值),但 symbol 调用点(第 871 行)仍传递 color 值,与 symbol-completion 不一致 |
| src/Graphics/Fonts/virtual_font.cpp | 调整 supported() 和 compile_bis() 中虚拟字体符号解析优先级,当字典中存在该符号时优先递归展开,修复虚拟组合符号在非 extend 模式下被错误转发到 base font 的问题 |
| src/Texmacs/Window/tm_button.cpp | 新增 texmacs_output_widget_transparent,与 texmacs_output_widget 逻辑基本一致,但使用 white 背景色并启用透明标志,用于菜单符号预览 |
| src/Texmacs/tm_window.hpp | 声明新接口 texmacs_output_widget_transparent,改动最小 |
| src/Scheme/L5/glue_widget.lua | 注册 Scheme 侧接口 widget-texmacs-output-transparent,绑定正确 |
| devel/221_3.md | 新增开发记录文档,清晰描述了问题原因、修复思路及测试方法 |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[用户输入 T,触发 tab cycling] --> B[symbol-completion 调用 make-menu-symbol]
B --> C{make-menu-symbol-widget}
C -->|menu-symbol-needs-typeset-preview? 为 true| D[make-menu-symbol-typeset-widget 完整 typeset 预览]
C -->|普通符号| E[widget-box 轻量预览]
D --> F[widget-texmacs-output-transparent]
F --> G[box_widget_rep transparent=true]
E --> H[box_widget_rep transparent=false]
subgraph virtual_font.cpp 修复
I{compile_bis/supported 解析 token r} -->|virt->dict 包含 r 且优先| J[递归展开虚拟定义]
I -->|否则| K[base_fn 查字形]
end
D -.-> I
Comments Outside Diff (1)
-
TeXmacs/progs/kernel/gui/menu-widget.scm, line 871 (link)symbol调用点仍传 color 值,与已修改的symbol-completion不一致symbol-completion和symbol-completion*已更新为直接传字符串,但第 871 行的symbol调用点仍然传(color symbol-color)(color 值而非字符串)。当make-menu-symbol-button收到非字符串的clr时,col-name会回退到"black"。若<lefttimesthree>或<righttimesthree>通过(symbol ...)上下文出现,在 liii-night 夜间主题下 typeset 预览会用黑色渲染,可能在深色背景上几乎不可见。
Reviews (1): Last reviewed commit: "[221_3] 修复数学 tab cycling 菜单中 `<lefttimes..." | Re-trigger Greptile
|
#ISSUE #3030 |
No description provided.