Page 1 of 1

Lexer & Caret alignment

Posted: 21.03.2021 22:14
by Tonigau
I experience an identical issue in 2 applications that use SynWrite as the code editor. GCB & FBedit
With commented code lines the editor(s) make green & Italic font for the text after comment chr.
Example 'This Is a Comment Line

The issue I have is the caret does not align to the actual text in parts of the line which make it difficult to edit (wrong chr deleted etc...) . The misalignment can also be observed when dragging selection on the line.
It is not so evident in short comment lines.

Q. Is this just a lexer issue with the app's (thought I would ask here first) or SynWrite [or maybe my installation].
My OS is Win7p x64

In attachment, the three lines 44,45,46 all have the same line end position. (for test 45 is Tabs & 46 is spaces issue = same)
1 chr is selected

Posted: 21.03.2021 22:42
by uvviewsoft
SynWrite is frozen. If you see that on CudaText, I tell about option "renderer_offsets" which solves it.
For Synwrite, you need to choose another font, which has the same char-sizes for Normal+Italic style (and not sure it will help...)

Posted: 22.03.2021 00:16
by Tonigau
Thanks, I will contact the app dev, see if they can move to Cuda
My workaround is to anticipate the offset or temporary un-comment the line.

Posted: 22.03.2021 10:26
by uvviewsoft
Another solution in Synwrite: remove 'italic' attribute from style of 'comments'. In "lexer properties" dialog.