Delete source files on move drag, clear drag_sources and allow_drags

Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/2f6384ba-c55a-4842-83a9-4cf1b0937420

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-05-05 16:10:19 +00:00
committed by GitHub
parent de6643d899
commit 6129fd66b3
3 changed files with 30 additions and 0 deletions

View File

@@ -459,4 +459,9 @@ class TestDnDKitten(BaseTest):
self.assertEqual(os.readlink(expected), os.readlink(actual))
else:
self.assert_files_have_same_content(expected, actual)
src_items_before = set(os.listdir(self.src_data_dir))
end_drag(False)
# After a move drag finishes, all source files from text/uri-list should be deleted
for name in src_items_before:
item_path = os.path.join(self.src_data_dir, name)
self.assertFalse(os.path.lexists(item_path), f'move drag: {name} should have been deleted from source')