mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-21 07:55:10 +02:00
Cleanup previous PR
This commit is contained in:
@@ -758,8 +758,9 @@ func (dnd *dnd) on_drop_data(cmd DC) error {
|
||||
}
|
||||
}
|
||||
pending := false
|
||||
expecting := utils.NewSetWithItems(drop_status.accepted_mimes...)
|
||||
for _, d := range dnd.drop_dests {
|
||||
if !d.completed {
|
||||
if !d.completed && expecting.Has(d.mime_type) {
|
||||
pending = true
|
||||
break
|
||||
}
|
||||
|
||||
@@ -233,8 +233,6 @@ func (dnd *dnd) run_loop() (err error) {
|
||||
dnd.send_test_response(utils.IfElse(dnd.drop_status.is_remote_client, "True", "False"))
|
||||
case "DROP_URI_LIST":
|
||||
dnd.send_test_response(strings.Join(dnd.drop_status.uri_list, "|"))
|
||||
case "CONFIRM_PENDING":
|
||||
dnd.send_test_response(utils.IfElse(len(dnd.confirm_drop.overwrites) > 0, "True", "False"))
|
||||
default:
|
||||
dnd.send_test_response("UNKNOWN TEST COMMAND: " + string(cmd.Payload))
|
||||
}
|
||||
|
||||
@@ -52,10 +52,6 @@ func (dnd *dnd) render_screen() error {
|
||||
lp.Println("Dragging data...")
|
||||
return nil
|
||||
}
|
||||
if dnd.drop_status.reading_data {
|
||||
lp.Println("Reading dropped data, please wait...")
|
||||
return nil
|
||||
}
|
||||
y := 0
|
||||
sz, _ := lp.ScreenSize()
|
||||
render_paragraph := func(text string) {
|
||||
@@ -84,6 +80,11 @@ func (dnd *dnd) render_screen() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
if dnd.drop_status.reading_data {
|
||||
lp.Println("Reading dropped data, please wait...")
|
||||
return nil
|
||||
}
|
||||
|
||||
if dnd.drop_status.in_window {
|
||||
if dnd.drop_status.action == 0 {
|
||||
render_paragraph("A drag is active. Drop it into one of the boxes below to perform that action on the dragged data. Available MIME types in the drag:")
|
||||
|
||||
Reference in New Issue
Block a user