Author Topic: Toggle comment not working very well  (Read 3259 times)

Offline rogeriodec

  • Multiple posting newcomer
  • *
  • Posts: 50
Toggle comment not working very well
« on: March 21, 2018, 11:50:45 pm »
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:
Code
//                    yant = yfrc;
                    xant = intersection.first;

After selecting the two lines and apply Toggle comment:

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

Is it a bug?
Windows 8.1

SVN 11400

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Toggle comment not working very well
« Reply #1 on: March 22, 2018, 12:29:25 am »
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!]

Offline rogeriodec

  • Multiple posting newcomer
  • *
  • Posts: 50
Re: Toggle comment not working very well
« Reply #2 on: March 22, 2018, 01:11:56 am »
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.
Code
	aaaaaaaaaaaaaaa
// xxxxxxxxxxxxxx

Select both line and press Ctrl+Q:

Code
	aaaaaaaaaaaaaaa
// xxxxxxxxxxxxxx
Windows 8.1

SVN 11400

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Toggle comment not working very well
« Reply #3 on: March 22, 2018, 01:13:42 am »
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!]

Offline rogeriodec

  • Multiple posting newcomer
  • *
  • Posts: 50
Re: Toggle comment not working very well
« Reply #4 on: March 22, 2018, 01:16:26 am »
Sorry, mistyped.

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

Code
	// aaaaaaaaaaaaaaa
xxxxxxxxxxxxxx
Windows 8.1

SVN 11400

Offline raynebc

  • Almost regular
  • **
  • Posts: 217
Re: Toggle comment not working very well
« Reply #5 on: March 22, 2018, 08:55:39 am »
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Toggle comment not working very well
« Reply #6 on: March 22, 2018, 11:12:47 am »
Patches welcome...
(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!]

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Toggle comment not working very well
« Reply #7 on: March 22, 2018, 07:28:53 pm »
please open a ticket on sf, so this won't get lost....

Offline raynebc

  • Almost regular
  • **
  • Posts: 217
Re: Toggle comment not working very well
« Reply #8 on: March 22, 2018, 08:08:35 pm »
I created ticket #650 describing some issues with the various comment functions.

Offline rogeriodec

  • Multiple posting newcomer
  • *
  • Posts: 50
Re: Toggle comment not working very well
« Reply #9 on: March 22, 2018, 09:34:07 pm »
Thank you!
Windows 8.1

SVN 11400