def test_scintillawrapper_void_position_int(self): editor.setText('Hello world') editor.setLexer(LEXER.CONTAINER) editor.startStyling(0, 31) editor.setStyling(5, 29) styledText = editor.getStyledText(0, 5) editor.setLexer(LEXER.NULL) self.assertEqual(styledText, ('Hello', [29, 29, 29, 29, 29]))
def style_it(match, STYLE): ''' Inform scintilla to do the styling''' if match[1] - match[0] >= 0: editor.startStyling(start_pos + match[0], 31) editor.setStyling(match[1] - match[0], STYLE)
def style_it(start, length, STYLE): ''' Inform scintilla to do the styling''' if length >= 0: editor.startStyling(start, 31) editor.setStyling(length, STYLE)
def style_it(match, STYLE): ''' Inform scintilla to do the styling''' if match[1]-match[0] >= 0: editor.startStyling(start_pos + match[0], 31) editor.setStyling(match[1]-match[0], STYLE)