Problem
With the iTerm2 dynamic profile from #40 installed, Cmd+Z (Undo) works in TextView as expected, but Cmd+Shift+Z (Redo) does nothing.
What's wired up
iTerm2 binding (from the profile, comment on #41):
"0x7a-0x120000": { "Action": 11, "Text": "0x19" }
Decoded: z + (Cmd|Shift) → send byte 0x19 = Ctrl+Y.
Per Terminal.Gui's TextView docs, Ctrl+Y should invoke Redo. So either the bytes aren't reaching TG, or the binding isn't doing what the docs say.
Likely causes to investigate
- Chord shadowing. CLAUDE.md notes: "Chord wins over view bindings:
Ctrl+W shadows TextView.Cut." Check whether anything in WorkbenchHost.BindDefaults or RegisterDefaultCommands has a binding starting with Ctrl+Y — even a single-key Ctrl+Y registration on the workbench scope would absorb the byte before TextView sees it.
- TextView Redo binding might not exist in TG 2.1.0 despite the docs. The docs page may be ahead of (or behind) the shipped binary. Confirm by inspecting
TextView.KeyBindings at runtime or reading the TG 2.1.0 source. If it's not bound, we need a different sequence (or add the binding ourselves on our TextViews).
- iTerm2 swallowing Cmd+Shift+Z natively before our profile binding fires. Quick check: in iTerm2 settings, search Key Bindings (both Global and the TuiCode profile) for any entry on Cmd+Shift+Z that overrides ours. The profile binding should take precedence when the profile is active, but worth confirming.
- Undo stack not deep enough / cleared. Unlikely — Cmd+Z works, so the stack is live. But if Undo immediately pops the stack to empty, Redo would silently do nothing. Test: type, undo once, then try redo.
Repro
- Open a file in TuiCode under iTerm2 with the TuiCode dynamic profile active.
- Type some text. ✅ Appears.
- Press Cmd+Z. ✅ Last edit undone.
- Press Cmd+Shift+Z. ❌ Nothing happens (expected: last undo re-applied).
Diagnostic next steps
- Use TG's input injection (per CLAUDE.md tests pattern) to inject a raw
Ctrl+Y KeyEvent and see whether TextView redoes. If yes → the bytes aren't reaching TextView, look at workbench-scope bindings. If no → TextView doesn't have Redo on Ctrl+Y in this TG version.
- Print
TextView.KeyBindings at startup to confirm what's actually bound.
Out of scope
The iTerm2 profile itself looks correct — fixing this issue may require code changes in WorkbenchHost or a TextView subclass, not a profile edit.
Problem
With the iTerm2 dynamic profile from #40 installed, Cmd+Z (Undo) works in
TextViewas expected, but Cmd+Shift+Z (Redo) does nothing.What's wired up
iTerm2 binding (from the profile, comment on #41):
Decoded:
z+ (Cmd|Shift) → send byte0x19=Ctrl+Y.Per Terminal.Gui's TextView docs,
Ctrl+Yshould invoke Redo. So either the bytes aren't reaching TG, or the binding isn't doing what the docs say.Likely causes to investigate
Ctrl+WshadowsTextView.Cut." Check whether anything inWorkbenchHost.BindDefaultsorRegisterDefaultCommandshas a binding starting withCtrl+Y— even a single-keyCtrl+Yregistration on the workbench scope would absorb the byte before TextView sees it.TextView.KeyBindingsat runtime or reading the TG 2.1.0 source. If it's not bound, we need a different sequence (or add the binding ourselves on ourTextViews).Repro
Diagnostic next steps
Ctrl+YKeyEventand see whether TextView redoes. If yes → the bytes aren't reaching TextView, look at workbench-scope bindings. If no → TextView doesn't have Redo on Ctrl+Y in this TG version.TextView.KeyBindingsat startup to confirm what's actually bound.Out of scope
The iTerm2 profile itself looks correct — fixing this issue may require code changes in
WorkbenchHostor aTextViewsubclass, not a profile edit.