mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-22 00:08:04 +02:00
Handle dnd chunking internally in the loop
This commit is contained in:
@@ -70,6 +70,10 @@ type Loop struct {
|
|||||||
style_ctx style.Context
|
style_ctx style.Context
|
||||||
atomic_update_active bool
|
atomic_update_active bool
|
||||||
pointer_shapes []PointerShape
|
pointer_shapes []PointerShape
|
||||||
|
dnd_chunking struct {
|
||||||
|
active bool
|
||||||
|
metadata DndCommand
|
||||||
|
}
|
||||||
|
|
||||||
// Queried capabilities from terminal
|
// Queried capabilities from terminal
|
||||||
TerminalCapabilities TerminalCapabilities
|
TerminalCapabilities TerminalCapabilities
|
||||||
|
|||||||
@@ -271,6 +271,16 @@ func (self *Loop) handle_dnd(data []byte) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if self.dnd_chunking.active {
|
||||||
|
self.dnd_chunking.metadata.Payload = cmd.Payload
|
||||||
|
self.dnd_chunking.metadata.Has_more = cmd.Has_more
|
||||||
|
self.dnd_chunking.active = cmd.Has_more
|
||||||
|
return self.OnDnDData(self.dnd_chunking.metadata)
|
||||||
|
}
|
||||||
|
if cmd.Has_more {
|
||||||
|
self.dnd_chunking.active = true
|
||||||
|
self.dnd_chunking.metadata = cmd
|
||||||
|
}
|
||||||
return self.OnDnDData(cmd)
|
return self.OnDnDData(cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user