diff options
Diffstat (limited to 'scintilla/src/EditView.cxx')
-rw-r--r-- | scintilla/src/EditView.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/scintilla/src/EditView.cxx b/scintilla/src/EditView.cxx index c46a0fb..7d5860e 100644 --- a/scintilla/src/EditView.cxx +++ b/scintilla/src/EditView.cxx @@ -215,11 +215,11 @@ void EditView::ClearAllTabstops() { ldTabstops = 0; } -int EditView::NextTabstopPos(int line, int x, int tabWidth) const { - int next = GetNextTabstop(line, x); +XYPOSITION EditView::NextTabstopPos(int line, XYPOSITION x, XYPOSITION tabWidth) const { + int next = GetNextTabstop(line, static_cast<int>(x + 2)); if (next > 0) - return next; - return ((((x + 2) / tabWidth) + 1) * tabWidth); + return static_cast<XYPOSITION>(next); + return (static_cast<int>((x + 2) / tabWidth) + 1) * tabWidth; } bool EditView::ClearTabstops(int line) { @@ -452,9 +452,8 @@ void EditView::LayoutLine(const EditModel &model, int line, Surface *surface, co XYPOSITION representationWidth = vstyle.controlCharWidth; if (ll->chars[ts.start] == '\t') { // Tab is a special case of representation, taking a variable amount of space - const int x = static_cast<int>(ll->positions[ts.start]); - const int tabWidth = static_cast<int>(vstyle.tabWidth); - representationWidth = static_cast<XYPOSITION>(NextTabstopPos(line, x, tabWidth) - ll->positions[ts.start]); + const XYPOSITION x = ll->positions[ts.start]; + representationWidth = NextTabstopPos(line, x, vstyle.tabWidth) - ll->positions[ts.start]; } else { if (representationWidth <= 0.0) { XYPOSITION positionsRepr[256]; // Should expand when needed |