Skip to content

[201_96] 修复tab cycling 中|[的一些显示错误#2973

Open
wumoin wants to merge 3 commits intomainfrom
hxh/201_96/tabcyc
Open

[201_96] 修复tab cycling 中|[的一些显示错误#2973
wumoin wants to merge 3 commits intomainfrom
hxh/201_96/tabcyc

Conversation

@wumoin
Copy link
Contributor

@wumoin wumoin commented Mar 12, 2026

201_96 修复tabcyc 中|[的一些错误

如何测试

  1. 启动程序,进入数学模式。
  2. 测试 |[ (注:'|'还有一项未被渲染出来,需要之后更新<barsuchthat>字体)

2026/03/12 修复tabcyc 中|[的一些错误

What

  • lambda-to-symbol 中补充了 math-separator 分支,把函数型绑定反解成 "<mid-...>" 形式的 completion 字符串。
  • math_font_rep::search_font 中放宽了 fallback 字符检查,允许 []| 作为普通候选字符串继续走数学字体渲染流程,而不是直接落进 error_font

Why

  • 原先 lambda-to-symbol 只处理大运算符、prime 和括号对,没有处理 math-separator,导致 middle separator 在 Tab 补全里缺少专门的显示形式。
  • []| 这些字符串如果走到 math_font 的错误分支,会被 error_font 强制画成红色,popup 的显示会误导调试。

How

  • math-separator 的 completion 名称通过字符串拼接得到:
    • 普通情形:"<mid-" + sep + ">"
    • "<nobracket>" 特判为 "<mid-.>"
  • math_font.cpp 中把 []| 加入允许字符集合,避免它们在补全 popup 中被当成非法数学字体输入。
image image

@wumoin wumoin changed the title [201_96] 修复tabcyc 中|[的一些错误 [201_96] 修复tab cycling 中|[的一些错误 Mar 12, 2026
@wumoin wumoin changed the title [201_96] 修复tab cycling 中|[的一些错误 [201_96] 修复tab cycling 中|[的一些显示错误 Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant