Skip to content

Commit

Permalink
Merge pull request HeyPuter#13 from HeyPuter/ignore-delete-when-renam…
Browse files Browse the repository at this point in the history
…ing-files

Don't delete files when delete key is pressed while renaming something
  • Loading branch information
jelveh authored Mar 4, 2024
2 parents 0abe651 + 53dc639 commit e974b76
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/initgui.js
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,10 @@ window.initgui = async function(){
else{
$selected_items = $(active_element).closest('.item-container').find('.item-selected');
if($selected_items.length > 0){
move_items($selected_items, trash_path);
// Only delete the items if we're not renaming one.
if ($selected_items.children('.item-name-editor-active').length === 0) {
move_items($selected_items, trash_path);
}
}
}
}
Expand Down

0 comments on commit e974b76

Please sign in to comment.