Repository navigation
[6236] 修复列表内插入表格后缺少插入列选项 - #4769
Merged
PinkMagicFly merged 1 commit intoNov 3, 2026
Merged
Conversation
PinkMagicFly
deleted the
pigmagicfly/6236/list-table-insert-column-options
branch
November 3, 2026 08:44
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.
概述
修复在有序列表、无序列表或描述列表中插入表格后,表格焦点工具栏及上下文菜单中缺失插入列(向左插入列、向右插入列)和删除列(向左删除列、向右删除列)选项的缺陷,并恢复快捷键在表格内的列操作行为。
对应任务文档 PR:LiiiLabs/dev-agent#356
根因与修改
焦点工具栏与焦点菜单修复:
0449b7c)中,为了防止一维垂直的列表项出现左右插入按钮,将focus-insert-icons与focus-insert-menu中的水平操作包裹在(assuming (not (list-structured-insert-context?)) ...)中。(item)标记,list-structured-insert-context?全局误判为真,导致列表内表格丢失全部列插入与删除按钮。(assuming (structured-horizontal? t) ...):由于当前被编辑对象t为表格时structured-horizontal?为真,表格展现完整的列操作按钮;列表纯文本项structured-horizontal?为假,不展现列按钮,既有规范保持不变。列表插入上下文判定守卫:
generic-edit.scm的list-structured-insert-context?中增加(not (table-markup-context? (focus-tree)))守卫条件。generic-kbd.scm将表格内部的列删除快捷键(Option+Delete/Option+Backspace)重映射为行删除。单元测试:
TeXmacs/progs/generic/test/generic-test.scm中增加test-structured-horizontal测试,覆盖表格与列表项的水平/垂直特性及表格上下文断言。验证
xmake b stem编译通过。xmake r generic-test运行通过(13 correct, 0 failed)。gf fmt --changed-since=main格式化通过。