Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0.5, 2.1, and 2.1.1

stable qscilib: don't bother with empty patterns (fixes #652)

Scintilla.highlightText() gets called with a zero-length pattern, which matches
large files many times and causes lots of useless SendScintilla calls.

Changeset 182539630952

Parent 7e16ca8e250e

by Phil Currier

Changes to one file · Browse files at 182539630952 Showing diff from parent 7e16ca8e250e Diff from another changeset...

 
270
271
272
 
 
 
273
274
275
 
270
271
272
273
274
275
276
277
278
@@ -270,6 +270,9 @@
  self.SendScintilla(self.SCI_SETINDICATORCURRENT,   self._highlightIndicator)   + if len(match) == 0: + return +   # NOTE: pat and target text are *not* unicode because scintilla   # requires positions in byte. For accuracy, it should do pattern   # match in unicode, then calculating byte length of substring::