File-association list view in settings + fix ghost glyphs after window moves

- New 'Filformat' row in the settings dialog opens a list of all
  [open_with] associations (.ext → command) plus the default editor;
  Delete removes an association (persisted to config.toml), Esc goes
  back
- Ghost fix: some terminals leave the right half of wide glyphs
  (emoji) behind when the diff only rewrites part of them — windows
  being dragged/resized/closed/snapped now request one full terminal
  repaint on completion, clearing any leftovers. Verified the
  compositor itself is clean (headless frames have no ghosts)
- Integration suite: 41/41

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-15 23:54:27 +02:00
parent 10ef87879a
commit a621fa10d7
5 changed files with 171 additions and 7 deletions

View File

@@ -440,6 +440,27 @@ def main():
app.send({"type": "close_window", "window_id": op2["id"]})
time.sleep(0.3)
# ── 4j. Associationsvyn i inställningarna ────────────────────────
disp.send(mouse_event({"Down": "Left"}, gx, 0))
disp.send(mouse_event({"Up": "Left"}, gx, 0))
text = disp.frame_text(timeout=5.0, contains="Filformat")
check("inställningarna visar filformat-raden", "1 associationer" in text,
f"frame: {text[:300]!r}")
for _ in range(5):
disp.send(key_event(code="Down"))
disp.send(key_event(code="Enter"))
text = disp.frame_text(timeout=5.0, contains=".txt")
check("associationsvyn listar .txt → less",
".txt" in text and "less" in text)
disp.send(key_event(code="Delete"))
time.sleep(0.5)
cfg_now = open(os.path.join(cfgdir, "config.toml")).read()
check("Delete tar bort associationen ur config",
'txt = "less"' not in cfg_now)
disp.send(key_event(code="Esc"))
disp.send(key_event(code="Esc"))
time.sleep(0.3)
# ── 5. Popup + popup_result via Enter ───────────────────────────
app.send({
"type": "spawn_popup", "message": "Integrationstest?",