SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[12.0.167 BETA] - Commenting with hotkey

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[12.0.167 BETA] - Commenting with hotkey
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post [12.0.167 BETA] - Commenting with hotkey Reply with quote
When I comment a line by selecting it and clicking the Comment with -- button, it comments that line. However, when I use the hotkey for the same goal, it comments the selected line, and then, in addition, the entire contents of the code editor. Check this short video here.
Sun Oct 10, 2021 3:42 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7838

Post Reply with quote
Thank you. I'm not able to reproduce it so far. Is it always reproducible on your system?
Mon Oct 11, 2021 11:53 am View user's profile Send private message
Mindflux



Joined: 25 May 2013
Posts: 804
Country: United States

Post Reply with quote
I only get the ENTIRE editor commented if I hit the hotkey on a BLANK line or a previously commented line.

If I follow gem's steps and hit hotkey on a HIGHLIGHTED line and it comments it, then hit the hotkey again the entire editor gets commented out.
Mon Oct 11, 2021 1:24 pm View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post Reply with quote
SysOp wrote:
Thank you. I'm not able to reproduce it so far. Is it always reproducible on your system?


No, it isn't. Well, sort of. It always happens on SQL Server connection and never on MariaDB. I haven't checked other types yet. It looks as if it duplicates the hotkey press. But why the inconsistency?

I thought this might be some interference with my Autohotkey scripts, but it still happens after a reboot with no Autohotkey stuff seen anywhere near the memory.

EDIT: Okay, I figured out. I had a "somewhat" redundant hotkey for Comment with --. I had SQL Assistant Options default overridden ages age. I know this because when I hit Escape on it a few minutes ago and it restored the factory default it had changed. I had it set to Ctrl+-. The factory default is Ctrl+/. However, in SQL Editor Key Mapping I also had Miscellaneous / Comment selected lines set to Ctrl+-. The moment I removed the key assignment from SE Key Mapping that hotkey "double-press" vanished. I still don't understand why it did not happen in MariaDB, though. The hotkeys are target-specific, not RDBMS-type-specific, aren't they?

This one is solved but it revealed another issue. I removed all the Default Hotkeys for commenting by pressing Backspace in Options / Targets / Common / Default Hot Keys. That disabled all of them (Comment Code with --, Comment Code with /**/, Uncomment Code). Now, I wanted to restore the to my defaults, but the results weren't 100% correct. When trying to set Uncomment Code, there's something fishy. Check this short video here. It seems that the input editbox for Uncomment Code (incorrectly) uses the same routine the ones for Bookmarks do.
Tue Oct 12, 2021 4:04 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7838

Post Reply with quote
Thank you. This explains it. The first on adds comments and that clears selection, when the second one comes in, there is nothing selected, and so it updates the entire text.
Tue Oct 12, 2021 8:35 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.