| 1173 | } |
| 1174 | |
| 1175 | QTextCursor PythonConsole::inputBegin() const |
| 1176 | { |
| 1177 | // construct cursor at begin of input line ... |
| 1178 | QTextCursor inputLineBegin(this->textCursor()); |
| 1179 | inputLineBegin.movePosition(QTextCursor::End); |
| 1180 | inputLineBegin.movePosition(QTextCursor::StartOfBlock); |
| 1181 | // ... and move cursor right beyond the prompt. |
| 1182 | int prompt = promptLength(inputLineBegin.block().text()); |
| 1183 | if (this->_sourceDrain && !this->_sourceDrain->isEmpty()) { |
| 1184 | prompt = this->_sourceDrain->length(); |
| 1185 | } |
| 1186 | inputLineBegin.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, prompt); |
| 1187 | return inputLineBegin; |
| 1188 | } |
| 1189 | |
| 1190 | QMimeData* PythonConsole::createMimeDataFromSelection() const |
| 1191 | { |
no test coverage detected