Menu

#1652 Incorrect tab size calculation

Bug
closed-fixed
scintilla (605)
5
2014-09-30
2014-09-04
mberchtold
No

The attached patch fixes the incorrect tab size calculation in 3.5.0.

1 Attachments

Discussion

  • Neil Hodgson

    Neil Hodgson - 2014-09-05

    What specifically is "the incorrect tab size calculation in 3.5.0"? Without a description of the problem, its difficult to examine any solution.

    This appears needlessly complex as it adds auxiliary state to a simple calculation. If the behaviour of 3.4.4 was correct then the change should attempt to revert to that code except when there are explicit tab stops. Also the patch is based on something that commented out code and added marker comments but this just makes it difficult to read as a patch.

     
  • Neil Hodgson

    Neil Hodgson - 2014-09-05

    If you are trying to revert to fractional tab widths the attached patch appears simpler.

     
  • mberchtold

    mberchtold - 2014-09-05

    From a quick test it seems that your patch has the same effects.

    You may want to add a cast to XYPOSITION in the EditView::NextTabstopPos method to avoid this warning:
    code:
    int next = GetNextTabstop(line, static_cast<int>(x + 2));
    if (next > 0)
    return next;
    warning:
    1>..\src\EditView.cxx(221): warning C4244: 'return' : conversion from 'int' to 'XYPOSITION', possible loss of data</int>

     
  • Neil Hodgson

    Neil Hodgson - 2014-09-05

    Committed as [a7f628].

     

    Related

    Commit: [a7f628]

  • Neil Hodgson

    Neil Hodgson - 2014-09-30
    • labels: --> scintilla
    • status: open --> closed-fixed
     

Log in to post a comment.