aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2011-12-13 12:12:59 +1100
committernyamatongwe <devnull@localhost>2011-12-13 12:12:59 +1100
commit2c97478eb29ac10a3e6774be8b89acbe398ec847 (patch)
treee10e4ea2958ee9083c1e4fa03f290ce38dfd310a /src
parentcce6bd57491263eb14fd0af60add43acbd79cbeb (diff)
downloadscintilla-mirror-2c97478eb29ac10a3e6774be8b89acbe398ec847.tar.gz
Use fractional tabWidth on both sides of expression to avoid double size
tabs on wide lines.
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 51632bc40..20509aef5 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -2271,8 +2271,8 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou
if (vstyle.styles[ll->styles[charInLine]].visible) {
if (isControl) {
if (ll->chars[charInLine] == '\t') {
- ll->positions[charInLine + 1] = ((((static_cast<int>(startsegx) + 2) /
- static_cast<int>(tabWidth)) + 1) * tabWidth) - startsegx;
+ ll->positions[charInLine + 1] =
+ ((static_cast<int>((startsegx + 2) / tabWidth) + 1) * tabWidth) - startsegx;
} else if (controlCharSymbol < 32) {
if (ctrlCharWidth[ll->chars[charInLine]] == 0) {
const char *ctrlChar = ControlCharacterString(ll->chars[charInLine]);