Browse Source

Fix for code editor long lines not rendering

tags/2021-05-28
jules 10 years ago
parent
commit
0a377a95c5
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp

+ 2
- 2
modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp View File

@@ -103,11 +103,11 @@ public:
break;
const SyntaxToken& token = tokens.getReference(i);
as.append (token.text.removeCharacters ("\r\n"), fontToUse, owner.getColourForTokenType (token.tokenType));
as.append (token.text.initialSectionNotContaining ("\r\n"), fontToUse, owner.getColourForTokenType (token.tokenType));
column += token.length;
}
as.draw (g, Rectangle<float> (x, (float) y, 10000.0f, (float) lineH));
as.draw (g, Rectangle<float> (x, (float) y, column * characterWidth + 10.0f, (float) lineH));
}
private:


Loading…
Cancel
Save