From 49e0a0b4e77b6ebedd59a0225a4ecd3b76d08a10 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 13 Dec 2011 12:12:59 +1100 Subject: Use fractional tabWidth on both sides of expression to avoid double size tabs on wide lines. --- src/Editor.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Editor.cxx') 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(startsegx) + 2) / - static_cast(tabWidth)) + 1) * tabWidth) - startsegx; + ll->positions[charInLine + 1] = + ((static_cast((startsegx + 2) / tabWidth) + 1) * tabWidth) - startsegx; } else if (controlCharSymbol < 32) { if (ctrlCharWidth[ll->chars[charInLine]] == 0) { const char *ctrlChar = ControlCharacterString(ll->chars[charInLine]); -- cgit v1.2.3