diff options
author | nyamatongwe <devnull@localhost> | 2011-12-13 12:12:59 +1100 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2011-12-13 12:12:59 +1100 |
commit | 2c97478eb29ac10a3e6774be8b89acbe398ec847 (patch) | |
tree | e10e4ea2958ee9083c1e4fa03f290ce38dfd310a /src | |
parent | cce6bd57491263eb14fd0af60add43acbd79cbeb (diff) | |
download | scintilla-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.cxx | 4 |
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]); |