Author Topic: comment_line steps on trailing text characters  (Read 7530 times)

Steve Black

  • Community Member
  • Posts: 57
  • Hero Points: 4
comment_line steps on trailing text characters
« on: December 14, 2007, 10:45:34 PM »
Just found this somewhat odd behavior, with, apparently, a quite restricted domain.  The problem is that using comment_line overwrites the last few characters of the line with the end-comment delimiter.  However, it only seems to happen in the following circumstances:

1. "At level of indent" is selected in comment line options

-AND-

2. The line begins somewhere between column 1 and the first indent level.

The following example illustrates:

Code: [Select]
<!--<div class="searchbox"><wiki:Include page="SearchBox.jsp" /></div>-->
 <!--<div class="searchbox"><wiki:Include page="SearchBox.jsp" /></div-->
  <!--<div class="searchbox"><wiki:Include page="SearchBox.jsp" /></di-->
   <!--<div class="searchbox"><wiki:Include page="SearchBox.jsp" /></d-->
    <!--<div class="searchbox"><wiki:Include page="SearchBox.jsp" /></div>-->
     <!--<div class="searchbox"><wiki:Include page="SearchBox.jsp" /></div>-->

The first line is fine because it starts in column 1.
The next three lines get their tails lopped by the number of spaces between column 1 and indent level 1.
The last two lines are ok, with #5 starting at indent level 1 and #6 at level 1 + 1 column.

I wouldn't be surprised if there were other characteristics as well, but this is what I've managed to deduce after a couple days of headscratching.  ???

Sandra

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 754
  • Hero Points: 36
Re: comment_line steps on trailing text characters
« Reply #1 on: December 18, 2007, 02:40:41 PM »
I took a look at this issue this morning, and it seems to have less to do with the line beginning before the first indent level and more with the number of spaces at the beginning being less than the number of characters in the open comment string.  If you keep your same indent level, but changed your comment line settings to '<!---', you'd probably see the same issue on the fifth line of your example.

In any case, it's bad news, and I'll see what I can do to make it right.  Thanks for reporting the issue.

Sandra

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 754
  • Hero Points: 36
Re: comment_line steps on trailing text characters
« Reply #2 on: December 18, 2007, 09:56:21 PM »
I think I've got this one straightened out now.  If you would like to update to the latest hotfix (Revision 27), a fix for this problem will be in there. 

Hotfix:  http://www.slickedit.com/content/view/459

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292

Steve Black

  • Community Member
  • Posts: 57
  • Hero Points: 4
Re: comment_line steps on trailing text characters
« Reply #4 on: December 19, 2007, 02:09:57 PM »
That does the trick.  Thanks for the speedy response - yet again!
hp++

Sandra

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 754
  • Hero Points: 36
Re: comment_line steps on trailing text characters
« Reply #5 on: December 19, 2007, 03:53:28 PM »