From f5740572b7096adb2f3c53d0af12fc2f31e42868 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 22 May 2025 23:10:25 +0530 Subject: [PATCH] Set window title --- kittens/choose_files/main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kittens/choose_files/main.go b/kittens/choose_files/main.go index 2722f92b8..251f38b8c 100644 --- a/kittens/choose_files/main.go +++ b/kittens/choose_files/main.go @@ -50,6 +50,11 @@ type Handler struct { func (h *Handler) draw_screen() (err error) { matches, in_progress := h.get_results() + if len(matches) > 0 { + h.lp.SetWindowTitle(matches[0].text) + } else { + h.lp.SetWindowTitle("Select a file") // TODO: make this conditional on mode + } h.lp.StartAtomicUpdate() defer h.lp.EndAtomicUpdate() h.lp.ClearScreen()