Recreated the patch. The 3 *.pp files go into components/synedit/
I am looking for any feedback, that will prevent me from developing this into the wrong direction.
The current ideas/plans are:- speed optimizations to highlight all, even so it does not curreently slow down working on my system. there may be possibilities to limit the amount of search, if only a few lines are invalidated.
- Further rework on the PaintLine code.Higlighter NONE, could use PaintToken too (simulating a single token for the whole line)
This would mean that brackets will be highlighted - Moving "special lines" into a Markup class - Moving "block selection" into a Markup classThis would simplify PaintLines. Also currently if the Block is across several HighlighterTokens, the will not join in the token accu. This would become possible.
Please also let me know, anything that would be needed before the above changes, in order to apply the change to SVN. I could then do further changes against the applied version.
If you have time, you can implement it for 'none' too.
Will do. I f I am right this will actually simplify some code. Let's see.
If you right click the source editor , and within the context menu choose the sub-menu "File settings", there is an other sub-menu "Highlighter". In addition to a list of all the highlighters from editor-enviroment, there are two entries:~Text does seem to be "None" but with MatchingBrackets ? or does text highlight anything else??
-Text -NoneI haven't found anything that is highlighted by "text" except it does the brackets, which "none" does currently not. So the question is, have I missed something, or is there some other intend?
Thanks Martin Mattias Gaertner wrote:
On Sun, 29 Jun 2008 13:14:46 +0100 Martin Friebe <[EMAIL PROTECTED]> wrote:Ok, I got the first version ready. It seems to run well on my system. ButI would be happy about any feedback (bugs, or optimization, or design issues, or ...).Strange. I get: patch: **** malformed patch at line 68: @@ -896,6 +902,8 @@ I wonder why.So far I have made 2 classes: - Highlight All (which is used in Incremental search, but can be used in normal search too)There is some room for performance optimization, but it already performs very well)- MatchingBrackets => just moved existing code. Further modules can be added easily. I also thought about moving the SelectionBlock into a class of it's own (see also question "highlighter None) A few Questions, various things I came across: - Selecting Highlighter = NONE or Text (from editor context menu) ~None, does also disable MatchingBrackets, is that intend?Because MatchingBrackets are an option on the EditorEnviroment "General" page, and not on the "Color/Highlighter" page?If you have time, you can implement it for 'none' too.~Text does seem to be "None" but with MatchingBrackets ? or does text highlight anything else??If None was not intend to suppress MatchingBrackets, code could be simplified, and None could pretend to paint a single (all line) token. Currently this can be done anyway. But it would;nt work, if SelectionBlock, became a TMarkup* class (as that would put the SelectBlock on the same level with Brackets.)- The Caret positions by name: I am aware there are 3 (is that right?) ways to reference to the caret position. - The Char(utf8) Position in the SourceTextHardly used.- The Byte Position in the Sourcetext (if all chars were 2 bytes, then thats means X = twice the CharPos)= LogicalCaretXY- The Position on the Screen (uses CharPos for X ?)Not the same as CharPos, because of tabs. = CaretXY- (Screen Position in Pixel)That makes 4.The source refers to the Caret in Various Ways: - CaretXY, CaretX, CaretY, GetCaretXY, fCaretX, fCaretY, ... I believe they refer to the CHAR pos ? This is also referred to a PhysicalCaret?Yes.- LogicalCaret, LogCarret referring to the BYTE pos ?Yes.* from the Synedit Source fCaretX: Integer; // physical position (screen) Is this really the position on screen, or is it the X(Char position) in the Source? (This differs if the screen is horizontally scrolled)It's the screen position without scrolling.Mattias_______________________________________________ Lazarus mailing list [email protected] http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
high_all.rar
Description: Binary data
_______________________________________________ Lazarus mailing list [email protected] http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
