Set window title

This commit is contained in:
Kovid Goyal 2025-05-22 23:10:25 +05:30
parent aec8a6b0b4
commit f5740572b7
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -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()