Sun, 01 Aug 2010 13:06:25 +0200
Fixed a few unicode related issues.
--- a/APIs/Python3/eric5.api Sat Jul 31 16:54:58 2010 +0200 +++ b/APIs/Python3/eric5.api Sun Aug 01 13:06:25 2010 +0200 @@ -4890,6 +4890,7 @@ eric5.QScintilla.Printer.Printer.formatPage?4(painter, drawing, area, pagenr) eric5.QScintilla.Printer.Printer?1(mode = QPrinter.ScreenResolution) eric5.QScintilla.QsciScintillaCompat.QSCINTILLA_VERSION?4() +eric5.QScintilla.QsciScintillaCompat.QsciScintillaCompat.UserSeparator?7 eric5.QScintilla.QsciScintillaCompat.QsciScintillaCompat.byteAt?4(pos) eric5.QScintilla.QsciScintillaCompat.QsciScintillaCompat.charAt?4(pos) eric5.QScintilla.QsciScintillaCompat.QsciScintillaCompat.clearAllIndicators?4(indicator) @@ -4957,6 +4958,7 @@ eric5.QScintilla.QsciScintillaCompat.QsciScintillaCompat.setLexer?4(lex = None) eric5.QScintilla.QsciScintillaCompat.QsciScintillaCompat.setStyleBits?4(bits) eric5.QScintilla.QsciScintillaCompat.QsciScintillaCompat.setStyling?4(length, style) +eric5.QScintilla.QsciScintillaCompat.QsciScintillaCompat.showUserList?4(id, lst) eric5.QScintilla.QsciScintillaCompat.QsciScintillaCompat.startStyling?4(pos, mask) eric5.QScintilla.QsciScintillaCompat.QsciScintillaCompat.styleAt?4(pos) eric5.QScintilla.QsciScintillaCompat.QsciScintillaCompat.zoomIn?4(zoom = 1)
--- a/Documentation/Help/source.qhp Sat Jul 31 16:54:58 2010 +0200 +++ b/Documentation/Help/source.qhp Sun Aug 01 13:06:25 2010 +0200 @@ -5407,6 +5407,7 @@ <keyword name="QsciScintillaCompat.setLexer" id="QsciScintillaCompat.setLexer" ref="eric5.QScintilla.QsciScintillaCompat.html#QsciScintillaCompat.setLexer" /> <keyword name="QsciScintillaCompat.setStyleBits" id="QsciScintillaCompat.setStyleBits" ref="eric5.QScintilla.QsciScintillaCompat.html#QsciScintillaCompat.setStyleBits" /> <keyword name="QsciScintillaCompat.setStyling" id="QsciScintillaCompat.setStyling" ref="eric5.QScintilla.QsciScintillaCompat.html#QsciScintillaCompat.setStyling" /> + <keyword name="QsciScintillaCompat.showUserList" id="QsciScintillaCompat.showUserList" ref="eric5.QScintilla.QsciScintillaCompat.html#QsciScintillaCompat.showUserList" /> <keyword name="QsciScintillaCompat.startStyling" id="QsciScintillaCompat.startStyling" ref="eric5.QScintilla.QsciScintillaCompat.html#QsciScintillaCompat.startStyling" /> <keyword name="QsciScintillaCompat.styleAt" id="QsciScintillaCompat.styleAt" ref="eric5.QScintilla.QsciScintillaCompat.html#QsciScintillaCompat.styleAt" /> <keyword name="QsciScintillaCompat.zoomIn" id="QsciScintillaCompat.zoomIn" ref="eric5.QScintilla.QsciScintillaCompat.html#QsciScintillaCompat.zoomIn" />
--- a/Documentation/Source/eric5.QScintilla.QsciScintillaCompat.html Sat Jul 31 16:54:58 2010 +0200 +++ b/Documentation/Source/eric5.QScintilla.QsciScintillaCompat.html Sun Aug 01 13:06:25 2010 +0200 @@ -56,7 +56,7 @@ QsciScintilla <h3>Class Attributes</h3> <table> -<tr><td>None</td></tr> +<tr><td>UserSeparator</td></tr> </table> <h3>Methods</h3> <table> @@ -268,6 +268,9 @@ <td><a href="#QsciScintillaCompat.setStyling">setStyling</a></td> <td>Public method to style some text.</td> </tr><tr> +<td><a href="#QsciScintillaCompat.showUserList">showUserList</a></td> +<td>Public method to show a user supplied list.</td> +</tr><tr> <td><a href="#QsciScintillaCompat.startStyling">startStyling</a></td> <td>Public method to prepare styling.</td> </tr><tr> @@ -1079,6 +1082,19 @@ <dd> style to set for text (integer) </dd> +</dl><a NAME="QsciScintillaCompat.showUserList" ID="QsciScintillaCompat.showUserList"></a> +<h4>QsciScintillaCompat.showUserList</h4> +<b>showUserList</b>(<i>id, lst</i>) +<p> + Public method to show a user supplied list. +</p><dl> +<dt><i>id</i></dt> +<dd> +id of the list (integer) +</dd><dt><i>lst</i></dt> +<dd> +list to be show (list of strings) +</dd> </dl><a NAME="QsciScintillaCompat.startStyling" ID="QsciScintillaCompat.startStyling"></a> <h4>QsciScintillaCompat.startStyling</h4> <b>startStyling</b>(<i>pos, mask</i>)
--- a/QScintilla/Editor.py Sat Jul 31 16:54:58 2010 +0200 +++ b/QScintilla/Editor.py Sun Aug 01 13:06:25 2010 +0200 @@ -2551,7 +2551,8 @@ if wc is None or not useWordChars: regExp = QRegExp('[^\w_]', cs) else: - regExp = QRegExp('[^%s]' % re.escape(wc), cs) + wc = re.sub('\w', "", wc) + regExp = QRegExp('[^\w%s]' % re.escape(wc), cs) start = regExp.lastIndexIn(text, index) + 1 end = regExp.indexIn(text, index) if start == end + 1 and index > 0:
--- a/QScintilla/MiniEditor.py Sat Jul 31 16:54:58 2010 +0200 +++ b/QScintilla/MiniEditor.py Sun Aug 01 13:06:25 2010 +0200 @@ -2184,7 +2184,8 @@ if wc is None: regExp = QRegExp('[^\w_]', cs) else: - regExp = QRegExp('[^%s]' % re.escape(wc), cs) + wc = re.sub('\w', "", wc) + regExp = QRegExp('[^\w%s]' % re.escape(wc), cs) start = regExp.lastIndexIn(text, index) + 1 end = regExp.indexIn(text, index) if start == end + 1 and index > 0:
--- a/QScintilla/QsciScintillaCompat.py Sat Jul 31 16:54:58 2010 +0200 +++ b/QScintilla/QsciScintillaCompat.py Sun Aug 01 13:06:25 2010 +0200 @@ -38,6 +38,8 @@ QsciScintilla incrementally. This class ensures compatibility to older versions of QsciScintilla. """ + UserSeparator = '\x04' + def __init__(self, parent = None): """ Constructor @@ -915,6 +917,28 @@ except AttributeError: return "" + ##################################################################################### + # replacements for buggy methods + ##################################################################################### + + def showUserList(self, id, lst): + """ + Public method to show a user supplied list. + + @param id id of the list (integer) + @param lst list to be show (list of strings) + """ + if id <= 0: + return + + self.SendScintilla(QsciScintilla.SCI_AUTOCSETSEPARATOR, + ord(self.UserSeparator)) + if self.isUtf8(): + lst = self.UserSeparator.join(lst).encode("utf-8") + else: + lst = self.UserSeparator.join(lst).encode("latin-1") + self.SendScintilla(QsciScintilla.SCI_USERLISTSHOW, id, lst) + ## ##################################################################################### ## # methods below have been added to QScintilla starting with version after 2.x ## #####################################################################################