aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorblasty <blasty@local>2026-08-07 20:04:12 +0200
committerblasty <blasty@local>2026-08-07 20:04:12 +0200
commit8012e9a8bc2426f0bee99e703364d56707ded8bc (patch)
tree5ea29fe7def518b910bb558f83eb016f0992f40e /docs
parentdemo: tighten the pacing (43s of pauses -> 19s) (diff)
downloadida-tui-8012e9a8bc2426f0bee99e703364d56707ded8bc.tar.gz
ida-tui-8012e9a8bc2426f0bee99e703364d56707ded8bc.tar.xz
ida-tui-8012e9a8bc2426f0bee99e703364d56707ded8bc.zip
Syntax-highlight the struct editor's C definitions
Diffstat (limited to 'docs')
-rw-r--r--docs/TEXTUAL_NOTES.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/TEXTUAL_NOTES.md b/docs/TEXTUAL_NOTES.md
index c8b265c..9970416 100644
--- a/docs/TEXTUAL_NOTES.md
+++ b/docs/TEXTUAL_NOTES.md
@@ -45,6 +45,14 @@ Hard-won Textual behaviour and the patterns this app relies on. Pairs with
the Footer (see `#search`/`#rename`/`#status`).
- Textual ships **no C/C++ tree-sitter grammar** — `TextArea(language="cpp")` is a
silent no-op. We highlight pseudocode with Pygments (`idatui/highlight.py`).
+ For the **editable** C in the struct editor, `highlight.CTextArea` overrides
+ `TextArea._build_highlight_map()` and fills the widget's own `_highlights`
+ map from the same lexer — the hook the tree-sitter path would fill, so the
+ line cache, selection and cursor stay stock. Two traps: those spans are
+ **byte** offsets into the line (the renderer decodes them with
+ `build_byte_to_codepoint_dict`, so character offsets smear on non-ASCII), and
+ a `TextAreaTheme` that sets `base_style` overrides the widget's CSS colours —
+ ours sets only `syntax_styles` so the editor keeps the app's background.
- **A modal's `Input` messages bubble to the App.** `SymbolPalette` (the Ctrl+N
fuzzy finder) has its own `Input`; its `Input.Changed`/`Input.Submitted` bubble
up to the app's handlers (which would run the `#search`/`#func-filter` logic and