# HG changeset patch # User Andrey Skvortsov # Date 1478618070 -10800 # Node ID 8ffd0b52c2c77e32414222c4816060de1511c91e # Parent 584b6fdb949ec9b1771eaffbf5cb928a0a3e0366 fix highlighting error and warning messages with non-lating characters diff -r 584b6fdb949e -r 8ffd0b52c2c7 Beremiz.py --- a/Beremiz.py Tue Nov 08 18:06:30 2016 +0300 +++ b/Beremiz.py Tue Nov 08 18:14:30 2016 +0300 @@ -248,12 +248,14 @@ # adding text. It seems that text modifications, even # programmatically, are disabled in StyledTextCtrl when read # only is active + start_pos = self.output.GetLength() self.output.SetReadOnly(False) self.output.AppendText(s) self.output.SetReadOnly(True) + text_len = self.output.GetLength() - start_pos if style != self.black_white: - self.output.SetStyling(len(s), style) + self.output.SetStyling(text_len, style) self.stack = [] self.lock.release() self.output.Thaw()