diff options
| author | blasty <blasty@local> | 2026-07-09 12:34:32 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-07-09 12:34:32 +0200 |
| commit | a6a1aae9cbd92be269840da9ca62b71d6af827b0 (patch) | |
| tree | c2b36a2d16623aeab23be52bbbdf25110b53ecbe /pyproject.toml | |
| parent | decompiler view: Tab/Shift+Tab toggle disasm<->pseudocode, full bodies (diff) | |
| download | ida-tui-a6a1aae9cbd92be269840da9ca62b71d6af827b0.tar.gz ida-tui-a6a1aae9cbd92be269840da9ca62b71d6af827b0.tar.xz ida-tui-a6a1aae9cbd92be269840da9ca62b71d6af827b0.zip | |
fix decompiler highlighting + cursor jank
Highlighting: Textual has NO C/C++ tree-sitter grammar (and the syntax extra
wasn't installed), so language='cpp' was a silent no-op. Replace TextArea with a
virtualized, Pygments-highlighted ScrollView:
- idatui/highlight.py: CLexer -> Rich styles, per-line Segment lists
- DecompView: lines highlighted ONCE at load, cached as Strips; O(1) scroll
Jank: profiling showed our code is ~3.6ms/move (render_line 0.018ms) -- the cost
was terminal repaint volume, since every cursor move refreshed the whole ~43-line
viewport. Now:
- cursor reactive repaint=False (no implicit full refresh)
- region-limited refresh: in-place moves repaint only the 2 changed rows
(measured 43 -> 2 render_line calls/move), full refresh only on scroll
Applied to both DisasmView and DecompView.
pilot suite 15/15 (adds highlighting assertion).
Diffstat (limited to 'pyproject.toml')
| -rw-r--r-- | pyproject.toml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pyproject.toml b/pyproject.toml index cb23cfa..9802a8f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ dependencies = [] [project.optional-dependencies] # The TUI layer pulls in Textual; the client/domain layers are stdlib-only. -tui = ["textual>=8"] +tui = ["textual>=8", "pygments>=2"] # pygments ships with rich; explicit for the C lexer dev = ["pytest>=8"] [project.scripts] |
