<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ida-tui.git/idatui/highlight.py, branch main</title>
<subtitle>tui for headless ida</subtitle>
<id>https://git.sl0p.foo/ida-tui.git/atom/idatui/highlight.py?h=main</id>
<link rel='self' href='https://git.sl0p.foo/ida-tui.git/atom/idatui/highlight.py?h=main'/>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/ida-tui.git/'/>
<updated>2026-07-09T10:34:32Z</updated>
<entry>
<title>fix decompiler highlighting + cursor jank</title>
<updated>2026-07-09T10:34:32Z</updated>
<author>
<name>blasty</name>
<email>blasty@local</email>
</author>
<published>2026-07-09T10:34:32Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/ida-tui.git/commit/?id=a6a1aae9cbd92be269840da9ca62b71d6af827b0'/>
<id>urn:sha1:a6a1aae9cbd92be269840da9ca62b71d6af827b0</id>
<content type='text'>
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 -&gt; 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 -&gt; 2 render_line calls/move), full refresh only on scroll
Applied to both DisasmView and DecompView.

pilot suite 15/15 (adds highlighting assertion).
</content>
</entry>
</feed>
