From 4c484ca1e8fce13fba532f71b86a1510ca0a901b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 20 Apr 2026 09:28:31 +0530 Subject: [PATCH] Highlight current drop action --- kittens/dnd/main.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kittens/dnd/main.go b/kittens/dnd/main.go index 8c76e1265..59ee03488 100644 --- a/kittens/dnd/main.go +++ b/kittens/dnd/main.go @@ -236,9 +236,18 @@ func run_loop(opts *Options, drop_dests map[string]drop_dest, drag_sources map[s lp.MoveCursorVertically(1) } } + const fg = 32 + if drop_status.action == copy_on_drop { + lp.Printf("\x1b[%dm", fg) + } render_box(1, "Copy", ©_button_region) + lp.QueueWriteString("\x1b[m") box_width := 6 + len("move")*scale + if drop_status.action == move_on_drop { + lp.Printf("\x1b[%dm", fg) + } render_box(1+int(sz.WidthCells)-box_width, "Move", &move_button_region) + lp.QueueWriteString("\x1b[m") _ = in_test_mode return nil }