summaryrefslogtreecommitdiffstats
path: root/scintilla/src/EditView.cxx
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2014-09-30 11:50:24 +0300
committerXhmikosR <xhmikosr@gmail.com>2014-09-30 11:52:03 +0300
commite3126ffde6c6ee2926aba4705f5ee090ca7120d1 (patch)
tree2902cec91a579ee3ddf82a2c57aae934882515dd /scintilla/src/EditView.cxx
parent45af17c0808a3234a60182bbbdb7eabaf852bb22 (diff)
downloadnotepad2-mod-e3126ffde6c6ee2926aba4705f5ee090ca7120d1.zip
notepad2-mod-e3126ffde6c6ee2926aba4705f5ee090ca7120d1.tar.gz
notepad2-mod-e3126ffde6c6ee2926aba4705f5ee090ca7120d1.tar.bz2
Update Scintilla to v3.5.1.
Diffstat (limited to 'scintilla/src/EditView.cxx')
-rw-r--r--scintilla/src/EditView.cxx13
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