Menu

#1865 TextTools: Toggle Line Comment works wrongly

None
closed-invalid
nobody
None
5
2017-04-03
2016-08-18
No

jEdit 5.3.0, TextTools 1.16.

In TextTools jEdit plugin there is the following bug:

After "Edit / Source / Line Comment", I have the following code block:

  # my $Iterator = $Query->limited_dataset( [$Params->{DBStart}, $Params->{ItemsPerPage}] )->iterator;
  # my @Cities   = ();
  # while (my $Item = $Iterator->fetch) {
    # my $City = {};
    # for (keys %$Item) {
      # $City->{$_} = $Item->{$_};
    # }
    # push @Cities, $City;
  # }
  # return \@Cities;

Then I run "Plugins / TexTools / Toggle Line Comment". And then it (wrongly) becomes (instead of uncommenting):

  ## my $Iterator = $Query->limited_dataset( [$Params->{DBStart}, $Params->{ItemsPerPage}] )->iterator;
  ## my @Cities   = ();
  ## while (my $Item = $Iterator->fetch) {
  #  # my $City = {};
  #  # for (keys %$Item) {
  #    # $City->{$_} = $Item->{$_};
  #  # }
  #  # push @Cities, $City;
  ## }
  ## return \@Cities;

Discussion

  • Alan Ezust

    Alan Ezust - 2017-03-20
    • summary: Toggle Line Comment works wrongly --> TextTools: Toggle Line Comment works wrongly
    • Group: -->
     
  • Dale Anson

    Dale Anson - 2017-04-03

    What edit mode are you using for this code? I'm assuming Python, and using that, I can't reproduce this issue. I did these steps:

    1. copy the code from the first example
    2. remove the leading # from each line
    3. select all text
    4. Edit - Source - Line Comment
    5. all lines are now preceded with #
    6. select all text
    7. Plugins - TextTools - Toggle Line Comment
    8. all lines are now uncommented as expected
     
  • Victor Porton

    Victor Porton - 2017-04-03

    Weird. it works now without the bug (with the same versions of jEdit and TextTools).

    And it is Perl.

     
  • Dale Anson

    Dale Anson - 2017-04-03
    • status: open --> closed-invalid
     
  • Dale Anson

    Dale Anson - 2017-04-03

    Good to know! I'll go ahead and close this.

     

Log in to post a comment.