Simplify TUI restoration for the external editor (#34551)

## What changed

Remove the unused `RestoreMode` selection from `Tui::with_restored`. The helper
now always restores the terminal while keeping raw mode enabled, matching its
external-editor call site.

GitOrigin-RevId: b820aaaa933d7354d2a21b95900b059b3e8e2ac6
This commit is contained in:
jif authored and copyberry committed 2026-07-21 14:16:40 +00:00
1 parent 27a9c4d6bd
commit b5b8a63fea
2 files changed
+5 -23

No files matched your search

+1 -3
View File
@@ -31,9 +31,7 @@ impl App {
let seed = self.chat_widget.composer_text_with_pending();
let editor_result = tui
.with_restored(tui::RestoreMode::KeepRaw, || async {
external_editor::run_editor(&seed, &editor_cmd).await
})
.with_restored(|| async { external_editor::run_editor(&seed, &editor_cmd).await })
.await;
self.reset_external_editor_state(tui);