Add undo/redo support for file rename dialog
Version information
Thunar 4.19.3 Xubuntu 24.10 (live ISO)
Steps to reproduce
- Create a new file/folder or rename an existing file/folder
- Type
testing
- While still renaming, wait a couple of seconds and then press the space bar and then type
more
- While still renaming, press ctrl+left and wait a couple of seconds, then type
for
(include the space after 'for') - While still renaming, press the end key and wait a couple of seconds, then type
things
(include the space before 'things') - While still renaming, wait a couple of seconds, then press ctrl+z
- Observe how your entire file/folder (re)naming was undone, effectively the same if you instead just canceled the entire (re)naming process.
Current behavior
Ctrl+z undoes the entire (re)naming process, behaving effectually the same if you had instead pressed the ESC key and/or canceled the entire (re)naming process (though, if you were creating a new file, then it does at least leave open the "Enter the name" dialog rather than requiring you to create the file again)
Expected outcome
After performing step 6, only step 5 should be undone. If you were then to subsequently perform another ctrl+z action, then it would subsequently only undo step 4, and so on.
Additional information
The above-mentioned "expected outcome" is what occurs if you try doing this in file managers used in the other "classic" Ubuntu flavors, that being Gnome Files (Gnome/Ubuntu), Dolphin (KDE/Kubuntu), and PCManFM-Qt (LXQT/Lubuntu).
Video demonstration: