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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you are trying to revert to fractional tab widths the attached patch appears simpler.
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>
Committed as [a7f628].
Related
Commit: [a7f628]