diff options
author | nyamatongwe <unknown> | 2011-12-13 12:12:59 +1100 |
---|---|---|
committer | nyamatongwe <unknown> | 2011-12-13 12:12:59 +1100 |
commit | 49e0a0b4e77b6ebedd59a0225a4ecd3b76d08a10 (patch) | |
tree | aa3cdc8263f8435864a22e91daf226e57ce21c1c | |
parent | 2b03b26fcd136791b9a48f4a05357efae347227b (diff) | |
download | scintilla-mirror-49e0a0b4e77b6ebedd59a0225a4ecd3b76d08a10.tar.gz |
Use fractional tabWidth on both sides of expression to avoid double size
tabs on wide lines.
-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]); |