Skip to content

Commit f574057

Browse files
committed
Set window title
1 parent aec8a6b commit f574057

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

kittens/choose_files/main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ type Handler struct {
5050

5151
func (h *Handler) draw_screen() (err error) {
5252
matches, in_progress := h.get_results()
53+
if len(matches) > 0 {
54+
h.lp.SetWindowTitle(matches[0].text)
55+
} else {
56+
h.lp.SetWindowTitle("Select a file") // TODO: make this conditional on mode
57+
}
5358
h.lp.StartAtomicUpdate()
5459
defer h.lp.EndAtomicUpdate()
5560
h.lp.ClearScreen()

0 commit comments

Comments
 (0)