@fml2 said in Feature Request / Question: Soft Wrap at Vertical Edge (Column 80) regardless of window size:
That’s interesting! I’d think that a NP++ plugin can only do things that are also possible in NP++ itself since the underlying engine is the same.
There is a way to do it in Scintilla:
SCI_SETMARGINLEFT and SCI_SETMARGINRIGHT set margins, in pixels.
A plugin, or a PythonScript, could determine the displayable text width of the Scintilla control (I think that would require getting the client width of the Scintilla control with GetClientRect, then using SCI_GETMARGINS to find the number of active margins and iterating through them with SCI_GETMARGINWIDTHN to subtract the margins; there might be an easier way that hasn’t occurred to me) and the width of a string of characters of the desired length (SCI_TEXTWIDTH with style 0), subtract, divide by two and set that margin on each side.