Skip to content

Commit

Permalink
Fix clearing styles in sci_set_lexer()
Browse files Browse the repository at this point in the history
  • Loading branch information
ntrel committed May 30, 2012
1 parent c84d486 commit fa5929e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sciwrappers.c
Expand Up @@ -531,9 +531,11 @@ gint sci_get_lexer(ScintillaObject *sci)

void sci_set_lexer(ScintillaObject *sci, guint lexer_id)
{
gint old = sci_get_lexer(sci);

SSM(sci, SCI_SETLEXER, lexer_id, 0);

if (sci_get_lexer(sci) != (gint)lexer_id)
if (old != (gint)lexer_id)
SSM(sci, SCI_CLEARDOCUMENTSTYLE, 0, 0);
}

Expand Down

0 comments on commit fa5929e

Please sign in to comment.