This is my first patch so please go easy on me :)
Currently, when a new directory is created, the newly created directory is not selected. Similarly, when renaming an existing file or directory, it does not remain active/highlighted blue after renaming.
This patch proposes to keep the file or directory selected after (re)naming it, even when the rename is cancelled (for example when you create a new directory and accept the default name, the rename is canceled).
This has some usability advantages:
- open the newly created directory without having to select it (ENTER)
- if you make a naming mistake, you can immediately fix that without having to re-select (F2)
- if you create a directory and forget to name it, you can fix that without having to select it (F2)
- consistent with windows file browser (not sure about Linux and Mac?)
One downside I could think of is that when you have multiple files/directories selected, and then rename one of them, the selection will be reset to that renamed file.
There also seems to be weird bug that I could use some help on. If you rename a file (F2), move your mouse away from that row, and then cancel the rename (ESC) the row only turns blue after moving your mouse over one of the files. I have run into similar bugs in the current master, so I don't think this commit causes it, but rather makes it more obvious by adding this new use-case.