Some cleanups

This commit is contained in:
Kovid Goyal
2026-05-18 11:14:11 +05:30
parent a74e0755bb
commit 32e6e834a6
2 changed files with 9 additions and 1 deletions

View File

@@ -772,7 +772,7 @@ func (dnd *dnd) on_drop_data(cmd DC) error {
}
idx := cmd.X - 1
if idx < 0 || idx > len(drop_status.offered_mimes) {
return fmt.Errorf("terminal sent drop data for a index outside the list of accepted MIMEs")
return fmt.Errorf("terminal sent drop data for an index (%d) outside the list of accepted MIMEs (length: %d)", idx, len(drop_status.offered_mimes))
}
mime := drop_status.offered_mimes[idx]
dest := dnd.drop_dests[mime]