##// END OF EJS Templates
Made use of plain text consistent.
epatters -
Show More
@@ -31,7 +31,7 b' class CompletionLexer(object):'
31 31 not string.endswith('\n'):
32 32 reversed_tokens.pop(0)
33 33
34 current_op = unicode()
34 current_op = ''
35 35 for token, text in reversed_tokens:
36 36
37 37 if is_token_subtype(token, Token.Name):
@@ -39,14 +39,14 b' class CompletionLexer(object):'
39 39 # Handle a trailing separator, e.g 'foo.bar.'
40 40 if current_op in self._name_separators:
41 41 if not context:
42 context.insert(0, unicode())
42 context.insert(0, '')
43 43
44 44 # Handle non-separator operators and punction.
45 45 elif current_op:
46 46 break
47 47
48 48 context.insert(0, text)
49 current_op = unicode()
49 current_op = ''
50 50
51 51 # Pygments doesn't understand that, e.g., '->' is a single operator
52 52 # in C++. This is why we have to build up an operator from
@@ -112,7 +112,7 b' class CompletionWidget(QtGui.QListWidget):'
112 112 def _update_current(self):
113 113 """ Updates the current item based on the current text.
114 114 """
115 prefix = self._current_text_cursor().selectedText()
115 prefix = self._current_text_cursor().selection().toPlainText()
116 116 if prefix:
117 117 items = self.findItems(prefix, (QtCore.Qt.MatchStartsWith |
118 118 QtCore.Qt.MatchCaseSensitive))
@@ -274,7 +274,7 b' class FrontendWidget(HistoryConsoleWidget):'
274 274 cursor = self.textCursor()
275 275 cursor.movePosition(QtGui.QTextCursor.StartOfLine,
276 276 QtGui.QTextCursor.KeepAnchor)
277 text = unicode(cursor.selectedText())
277 text = str(cursor.selection().toPlainText())
278 278 return self._completion_lexer.get_context(text)
279 279
280 280 def _interrupt_kernel(self):
General Comments 0
You need to be logged in to leave comments. Login now