Opened 16 years ago
Closed 16 years ago
#322 closed Bug (Fixed)
SciTE wrong highlighting when using nested #CS/#CE
Reported by: | Hubertus72 | Owned by: | Jos |
---|---|---|---|
Milestone: | 3.2.13.4 | Component: | SciTE4AutoIt |
Version: | Other | Severity: | None |
Keywords: | SciTE nested comment | Cc: |
Description
#comments-start Beep() #comments-start Beep() #comments-end Beep() #comments-end MsgBox(0,"No Beep","No Beep")
This code work perfect and there is no beep at all.
But... in SciTE editor, the last beep() is not shown as comment.
Nesting works fine, but SciTE's display has a bug.
Attachments (0)
Change History (9)
comment:1 follow-up: ↓ 2 Changed 16 years ago by Jos
comment:2 in reply to: ↑ 1 Changed 16 years ago by Hubertus72
Replying to Jos:
I see what you are saying but am not sure if I ever will "fix" this in the SciTE lexer because that will be a complex solution to a very minor issue.
We could debate is SciTE is wrong or AutoIt3 is wrong here. :)
Jos
Hi Jos,
I've no problem whith not fixing this issue. Real sorry to find "the needles", but I think it's better to show an issue than to skip it. :)
Many, many thanks for your excellent support of SciTE4AutoIt !!!
Hubertus
comment:3 Changed 16 years ago by Valik
Jos, this seems fixable, for example, the Lua lexer gets it right:
--[[ Comment --[[ Nested block comment --]] Still a comment --]] NotAComment()
I haven't looked at how the Lua lexer does it, but maybe you should have a peek for ideas? Is it possible to just use a simple counter that gets incremented each time it sees the block start and decremented each time it sees the block end? Then just always color the text in comment if counter != 0?
comment:4 Changed 16 years ago by Valik
- Version changed from 3.2.12.0 to Other
comment:5 Changed 16 years ago by Jos
- Status changed from new to accepted
I checked out the LUA lexer and used the same "mechanism" setting the level in the comment lines. Modified the Au3 Lexer that it supports nested Commentblocks both for Highlighting and Folding.
Uploaded a beta version of scilexer.dll to the Scite4autoit3 beta directory:
http://www.autoitscript.com/autoit3/scite/download/beta_SciTE4AutoIt3/
Will use it for a while before committing to ensure I didn't break anything.
Let me knwo when you find issues with it.
Jos
comment:6 Changed 16 years ago by Valik
Jos, folding seems fairly broken in that version. First, multiple lines of single-line comments no longer collapse as one block (I hate this aspect of the Lua lexer).
This code doesn't collapse correctly:
#Region ; Comment ; Comment Func Test() EndFunc #EndRegion
Instead of collapsing to:
#Region
It collapses to:
#Region Func Test() EndFunc #EndRegion
Lastly, I think folding is really broken and it just happens to accidentally work right in some cases. What tips me off to that is the lines in the fold margin, they are all out of whack. I see a lot of minus boxes but not really any lines to indicate what will be folded. It's like everything is out of sync.
comment:7 Changed 16 years ago by anonymous
Doh... only focussed on the CommentBlocks and haven't had time to test much.
Will have a look at this next week.
Jos
comment:8 Changed 16 years ago by Jos
Uploaded a new beta version of scilexer.dll which takes care of the latest introduced issue.
comment:9 Changed 16 years ago by Jos
- Milestone set to 3.2.13.4
- Resolution set to Fixed
- Status changed from accepted to closed
Fixed in version: 3.2.13.4
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
I see what you are saying but am not sure if I ever will "fix" this in the SciTE lexer because that will be a complex solution to a very minor issue.
We could debate is SciTE is wrong or AutoIt3 is wrong here. :)
Jos