From 858c453ae9a698b689426e131220b6cbeb009e4d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 18 May 2026 08:46:34 +0000 Subject: [PATCH] Simplify message formatting in render.go Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/84513fee-68de-4504-b41b-e8643e0ea585 Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com> --- kittens/dnd/render.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/kittens/dnd/render.go b/kittens/dnd/render.go index 5e944fe85..9758c31d6 100644 --- a/kittens/dnd/render.go +++ b/kittens/dnd/render.go @@ -5,7 +5,6 @@ import ( "strings" "github.com/kovidgoyal/kitty/tools/tui/loop" - "github.com/kovidgoyal/kitty/tools/utils" "github.com/kovidgoyal/kitty/tools/wcswidth" ) @@ -109,8 +108,13 @@ func (dnd *dnd) render_screen() error { } if dnd.allow_drops { if dnd.num_dropped_files > 0 { - noun := utils.IfElse(dnd.num_dropped_files == 1, "file", "files") - render_paragraph(fmt.Sprintf(`%d %s %s been dropped in the last drop event. You can drop more data or press Esc to quit.`, dnd.num_dropped_files, noun, utils.IfElse(dnd.num_dropped_files == 1, "has", "have"))) + verb := "have" + noun := "files" + if dnd.num_dropped_files == 1 { + verb = "has" + noun = "file" + } + render_paragraph(fmt.Sprintf(`%d %s %s been dropped in the last drop event. You can drop more data or press Esc to quit.`, dnd.num_dropped_files, noun, verb)) } else { render_paragraph(`Drag some data from another application into this window to transfer the files here.`) }