mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-06 09:15:57 +02:00
Add comment explaining data_capacity/data_size reset in finish_remote_data
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/fdd92dca-f2f9-4bb6-9d85-b5daeaa501f7 Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
c98c8542ca
commit
392b6882c3
@@ -1745,6 +1745,8 @@ finish_remote_data(Window *w, size_t item_idx) {
|
||||
new_size += 2;
|
||||
}
|
||||
free(ds.items[item_idx].uri_list); ds.items[item_idx].uri_list = NULL; ds.items[item_idx].num_uris = 0;
|
||||
// The fd has been completely rewritten with updated (cached) URIs; update the read tracking
|
||||
// fields so drag_get_data returns the full new content starting from the beginning.
|
||||
ds.items[item_idx].data_capacity = new_size;
|
||||
ds.items[item_idx].data_size = 0;
|
||||
int ret = dnd_is_test_mode() ? 0 : notify_drag_data_ready(global_state.drag_source.from_os_window, ds.items[item_idx].mime_type);
|
||||
|
||||
Reference in New Issue
Block a user