When I step through it in the debugger I notice that that value is being reset later on by the call to ViewStyle::Refresh() here:

        maskInLine = 0xffffffff;
        for (int margin=0; margin < margins; margin++) {
                fixedColumnWidth += ms[margin].width;

Only the line margins have a (possible) non-zero width at this point because the others are all set to zero in FormatRange(). An appropriate fix (for me) would be to set the width of the line margins to zero too.

Like I said, I don't know why this problem doesn't appear in SciTE. I don't really have the means to test it right now because I'm at home on my mac and I don't have any windows or linux boxes here. I can look at it more closely on Monday.

I should also mention that I'm using my own Qt port of scintilla so that might have something to do with the difference. By the way, I'm a little surprised that the documentation for the printing functions indicates that they are windows specific. In my experience they have proven quite portable.

Jason


On Feb 16, 2007, at 9:31 PM, Neil Hodgson wrote:

Jason Haslam:

int xStart = vsPrint.fixedColumnWidth + pfr->rc.left + lineNumberWidth;

vsPrint.fixedColumnWidth contains the width of the line number margin
(as set in the GUI) but lineNumberWidth also includes the width of
"99999".  This seems like an error to me.  The width of the numbers
is being counted twice.

        ViewStyle vsPrint(vs);
        // ...
        vsPrint.fixedColumnWidth = 0;

  Neil
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to