| 99 | } |
| 100 | |
| 101 | void ColumnEditorDialog::insertTextAtColumn(ScintillaNext *editor, int line, int column, const QString &str) |
| 102 | { |
| 103 | const int lineEndPosition = editor->lineEndPosition(line); |
| 104 | const int lineEndColumn = editor->column(lineEndPosition); |
| 105 | |
| 106 | // If the line does not end past the needed column, then use the left over as virtual space |
| 107 | if (lineEndColumn < column) { |
| 108 | editor->setTargetRange(lineEndPosition, lineEndPosition); |
| 109 | |
| 110 | editor->setTargetStartVirtualSpace(column - lineEndColumn); |
| 111 | editor->setTargetEndVirtualSpace(column - lineEndColumn); |
| 112 | } |
| 113 | else { |
| 114 | const int pos = editor->findColumn(line, column); |
| 115 | |
| 116 | editor->setTargetRange(pos, pos); |
| 117 | } |
| 118 | |
| 119 | editor->replaceTarget(-1, str.toUtf8().constData()); |
| 120 | } |
nothing calls this directly
no outgoing calls
no test coverage detected