[222_49] fix math mode tab cycling for backtick, brackets and pipe#2916
Merged
wumoin merged 2 commits intoMoganLab:mainfrom Mar 5, 2026
Conversation
wumoin
approved these changes
Mar 5, 2026
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.
Fixes #2910
In math mode, backtick (
`), square brackets ([, ]), and vertical bar (|) do not show the Tab cycle focus box popupSummary
Enable the Tab cycle popup for keys bound to procedures (
make-lprime,math-bracket-open) in math mode, so users can discover and cycle through variants using Tab.Developer document:
devel/222_49.mdIssue Found
In
math-edit.scm, thetabcycle-symbolsfunction only handled string-type keyboard bindings. Keys like`,[, and|are bound to procedures (e.g.,make-lprime,math-bracket-open), so tabcycle-symbols returned an empty list and no popup was shown — even though these keys have Tab variants defined in math-kbd.scm.Changes
Extended lambda-to-symbol in
TeXmacs/progs/math/math-edit.scmto handlemake-lprimeandmath-bracket-open. For brackets, left and right args are concatenated for unique display (e.g.,[],[[,]],][).Modified
tabcycle-symbolsto usefunction-to-symbolfor procedure-bound primary symbols:primary-namefrombaseinstead of usingprimary-symdirectly, preventing crashes whenprimary-symis a procedure.How to Test
$`(backtick) — verify a Tab cycle popup appears showing prime variantsTabto cycle through the variants[— verify a popup appears showing bracket pair variants ([], [[, ]], ][)|— verify a popup appears showing pipe variantsa— verify the existing Tab cycle behavior (a → α) still works correctlytab-cycle-fix.mp4