Show More
@@ -30,7 +30,7 b' class ConsoleWidget(QtGui.QPlainTextEdit):' | |||
|
30 | 30 | override_shortcuts = False |
|
31 | 31 | |
|
32 | 32 | # The number of spaces to show for a tab character. |
|
33 |
tab_width = |
|
|
33 | tab_width = 8 | |
|
34 | 34 | |
|
35 | 35 | # Protected class variables. |
|
36 | 36 | _ctrl_down_remap = { QtCore.Qt.Key_B : QtCore.Qt.Key_Left, |
@@ -64,6 +64,9 b' class FrontendWidget(HistoryConsoleWidget):' | |||
|
64 | 64 | """ A Qt frontend for a generic Python kernel. |
|
65 | 65 | """ |
|
66 | 66 | |
|
67 | # ConsoleWidget interface. | |
|
68 | tab_width = 4 | |
|
69 | ||
|
67 | 70 | # Emitted when an 'execute_reply' is received from the kernel. |
|
68 | 71 | executed = QtCore.pyqtSignal(object) |
|
69 | 72 | |
@@ -139,7 +142,8 b' class FrontendWidget(HistoryConsoleWidget):' | |||
|
139 | 142 | if self._get_prompt_cursor().blockNumber() != \ |
|
140 | 143 | self._get_end_cursor().blockNumber(): |
|
141 | 144 | spaces = self._input_splitter.indent_spaces |
|
142 |
self.appendPlainText('\t' * (spaces / |
|
|
145 | self.appendPlainText('\t' * (spaces / self.tab_width)) | |
|
146 | self.appendPlainText(' ' * (spaces % self.tab_width)) | |
|
143 | 147 | |
|
144 | 148 | def _prompt_finished_hook(self): |
|
145 | 149 | """ Called immediately after a prompt is finished, i.e. when some input |
General Comments 0
You need to be logged in to leave comments.
Login now