@Laurie-Stearn said in Columns++ display anomaly:
Out of interest, getting similar behaviour in a UDL when selecting Arial as font as opposed to Consolas:
<WordsStyle name="COMMENTS" fgColor="008000" bgColor="000000" colorStyle="1" fontName="Arial" fontStyle="2" nesting="0" />
As before type a long line of text which overflows the wrap limit thus
texttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttext
Then insert before it the opening comment tag:
/*
Solid pink line appears below the long line which prevents any cursor movement below with down-arrow.
Replacing Arial with Consolas for example doesn’t repro.
Some rare irreproducible glitchiness with pink lines may occur in other situations by just typing the slash instead of the asterisk.
Edit: Just realised this is for a plugin not installed - the issue seems to be with N++ itself. Sorry.
When it happened with my plugin (Columns++) the cause turned out to be a wrapped line getting shorter (due to tab layout changing), so that it needed one less wraps. The solution involved temporarily disabling Scintilla’s line cache: something that can cause slow processing in large files with word wrap on. The problem doesn’t happen when editing itself makes the line shorter; it happens when something done after the editing is complete (like recalculating tab widths, or changing styles) causes the line to get shorter.
My guess is that in this case, the text wraps to n lines after editing, before the new styling is applied; then, when styling is applied, the text only requires n-1 lines for wrapping, and the leftover line is magenta-marked. That marking is a Scintilla “feature” to show that something went wrong. (Why it doesn’t just correct the wrapping instead, I don’t know. Scintilla is open source, but it’s still pretty much a black box to me.)
The practical fix is probably to avoid specifying different fonts (or font variations with differing widths) for different styles if you expect to use them with word wrap. For performance reasons, turning off the Scintilla line-wrapping cache would not be something Notepad++ would do.