News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Toggle comment not working very well

Started by rogeriodec, March 21, 2018, 11:50:45 PM

Previous topic - Next topic

rogeriodec

Windows 8.1.
svn 11313
----------
Selecting 2 contiguous lines, the first one being marked as a comment and the second not, the Edit-> Toggle comment command does not reverse the first line as it should, but only comments the two lines.

Ex:

//                    yant = yfrc;
                    xant = intersection.first;


After selecting the two lines and apply Toggle comment:


////                    yant = yfrc;
//                    xant = intersection.first;


Is it a bug?
Windows 8.1

SVN 11400

oBFusCATed

This looks like the sane behaviour in this case.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

rogeriodec

Sorry, but I have to disagree.
Toggle means to reverse the situation of the lines.
That is, a line that is a comment, becomes a normal line and the line that is normal, becomes comment.
See Notepad ++, for example.

aaaaaaaaaaaaaaa
// xxxxxxxxxxxxxx


Select both line and press Ctrl+Q:


aaaaaaaaaaaaaaa
// xxxxxxxxxxxxxx

Windows 8.1

SVN 11400

oBFusCATed

So notepad++ does nothing in this case?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

rogeriodec

Sorry, mistyped.

After pressing Ctrl+Q (on Notepad++):


// aaaaaaaaaaaaaaa
xxxxxxxxxxxxxx

Windows 8.1

SVN 11400

raynebc

I agree that toggle should work the way rogeriodec suggests, unless it's specifically intended not to toggle per-line.  Otherwise the function is of limited usefulness, such as if you had a long block of code that toggles between two different test configurations of code by swapping which part is commented.

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

BlueHazzard

please open a ticket on sf, so this won't get lost....

raynebc

I created ticket #650 describing some issues with the various comment functions.

rogeriodec

Windows 8.1

SVN 11400