Files
compiler-explorer/static
mattgodbolt-moltyandClaude Opus 5 982c693012 Unify the TomSelect repaint workaround in one place
clearOptions()/addOption() only mark a tom-select drop-down's rendered
content stale. Nothing repaints it: open() does not, and only the focus
and input handlers call refreshOptions(). So a drop-down that is open,
or that is reopened without first losing focus, keeps showing the
previous option list.

This had been discovered and solved twice already, in gccdump-view and
then in diff (#9058), and missed in the other two panes that rebuild a
picker straight off a compile result. Move it into a shared
replaceOptions() helper and route all four through it.

Fixes the two that had no repaint at all:
 - cfg-view's function selector, rebuilt in onCompileResult
 - opt-pipeline's group selector, rebuilt via updateResults

Also drops the isOpen guard #9058 added. It was wrong: a drop-down can
be closed but still focused, and reopening it that way does not repaint,
so the stale list would survive. gccdump had it right by refreshing
unconditionally.

gccdump keeps its trailing refreshOptions() because the addItem() after
the rebuild goes through refreshItems(), which re-marks the content
stale, so the repaint done during replaceOptions() no longer covers it.

cfg-view previously cleared its options before deciding whether it had a
cfg at all, so the no-cfg path now explicitly empties the picker rather
than leaving the previous functions listed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-24 22:28:20 -05:00
..
2025-10-28 09:45:26 +01:00
2026-06-02 12:19:29 -05:00
2026-07-02 18:26:35 +01:00
2026-06-02 12:19:29 -05:00
2025-07-28 10:34:46 -05:00
2025-04-24 12:10:37 -05:00