CTRL+D changes so much code without safety, too close to CTRL+S
Original Reporter info from Mantis: zex2011
-
Reporter name: Zex Atilla
Original Reporter info from Mantis: zex2011
- Reporter name: Zex Atilla
Description:
Not everyone uses JEDI code formatting.
God knows how many times I accidentally pressed CTRL+D while pressing CTRL+S to save my code. Sure, you can press UNDO if you notice the change right away. But if you're busy writing code it may take time to notice that entire unit has changed.
Then you have a choice:
- Press UNDO and lose all the new code you wrote. Which programmer would do that? Also, it doesn't work if you already closed the file.
- Manually undo all the changes that JEDI code formatting did. And this could be thousands of lines.
I'm surprised that such a powerful function that potentially changes thousands of lines has no safety at all. It should have a dialog THE FIRST TIME it is used:
---------
Would you like to reformat your code:
Yes No
[x] Don't ask this question anymore
---------
If the customer clicks "Yes" and "Don't ask anymore", the function will do its job without ever asking again (like now).
If the user clicks "No" and "Don't ask anymore" then CTRL+D shortcut should be removed. Especially because CTRL+D is so damn close to CTRL+S, which is a very often used function.
You bet that some of the new users of Lazarus have the same problem. "WTF? Who changed my code? Did I press something? When?"
Mantis conversion info:
- Mantis ID: 25689
- Version: 1.0.14