Ctrl-S save shortcut
Posted: Wed Apr 20, 2016 12:04 am
A large part of my recent motivation to compile the latest version of Mudlet was so I could add in support for CTRL+S to save scripts that I'm editing so I can simply tab back and forth between the main window for easy, mouse-free testing. Having gotten Mudlet compiled finally, I decided to dig deeper into the code to see what I'd have to do to add that support. Lo and behold, on line 348 of dlgTriggerEditor.cpp, I find:
I also see that a setShortcut call for Ctrl+F to be linked with the search feature has been disabled via a different commit, but I don't really care about that particular function enough to want to enable it.
Edit 1: Welp, uncommented that line and it seems to be working just fine. In fact, went ahead and inserted
Edit 2: Started messing around with TTextEdit.cpp trying to get Cmud style full-line highlighting when you click on the timestamp besides a line. Getting it to work with just single clicks was actually really easy, but getting it to work when dragging across multiple lines proving to be a bit tougher. It works dragging upwards through lines currently, but I'm having a hard time figuring out how to change
It was changed per commit 96bb8d2ed38df344403342439f2aa45d906748cc//saveAction->setShortcut(tr("Ctrl+S"));
I also see that a setShortcut call for Ctrl+F to be linked with the search feature has been disabled via a different commit, but I don't really care about that particular function enough to want to enable it.
Edit 1: Welp, uncommented that line and it seems to be working just fine. In fact, went ahead and inserted
at line 371 and now I can save the profile with ctrl+shift+s while in the code editor. =D
Edit 2: Started messing around with TTextEdit.cpp trying to get Cmud style full-line highlighting when you click on the timestamp besides a line. Getting it to work with just single clicks was actually really easy, but getting it to work when dragging across multiple lines proving to be a bit tougher. It works dragging upwards through lines currently, but I'm having a hard time figuring out how to change
to suit me. Will post again if I manage to get it working 100% at some point.