11:b0996e4a289e | 12:1d8dd9706f46 |
---|---|
8 """ | 8 """ |
9 | 9 |
10 from PyQt4.QtCore import QObject, SIGNAL, QRegExp | 10 from PyQt4.QtCore import QObject, SIGNAL, QRegExp |
11 from PyQt4.Qsci import QsciLexerRuby | 11 from PyQt4.Qsci import QsciLexerRuby |
12 | 12 |
13 from CompleterBase import CompleterBase | 13 from .CompleterBase import CompleterBase |
14 | 14 |
15 import Preferences | 15 import Preferences |
16 | 16 |
17 class CompleterRuby(CompleterBase): | 17 class CompleterRuby(CompleterBase): |
18 """ | 18 """ |
57 """ | 57 """ |
58 Public slot called to handle the user entering a character. | 58 Public slot called to handle the user entering a character. |
59 | 59 |
60 @param charNumber value of the character entered (integer) | 60 @param charNumber value of the character entered (integer) |
61 """ | 61 """ |
62 char = unichr(charNumber) | 62 char = chr(charNumber) |
63 if char not in ['(', ')', '{', '}', '[', ']', ',', "'", '"', '\n', ' ']: | 63 if char not in ['(', ')', '{', '}', '[', ']', ',', "'", '"', '\n', ' ']: |
64 return # take the short route | 64 return # take the short route |
65 | 65 |
66 line, col = self.editor.getCursorPosition() | 66 line, col = self.editor.getCursorPosition() |
67 | 67 |