diff options
Diffstat (limited to 'objects/basetexteditor.cpp')
| -rw-r--r-- | objects/basetexteditor.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/objects/basetexteditor.cpp b/objects/basetexteditor.cpp index 8bc0ded..93a967f 100644 --- a/objects/basetexteditor.cpp +++ b/objects/basetexteditor.cpp @@ -37,6 +37,7 @@ #include <coreplugin/messagemanager.h> #include <QTextCursor> +#include "mark.h" using namespace Scripting::Internal; @@ -404,6 +405,25 @@ QString BaseTextEditor::text() return QString(); } +/** + * @brief Create a mark for the given line and column + * + * If line and column isn't provided, the currentline and column is used. + */ +Mark *BaseTextEditor::createMark(int line, int column) +{ + if (line == -1) + line = currentLine(); + if (column == -1) + column = currentColumn(); + return Mark::create(this, line, column); +} + +void BaseTextEditor::gotoMark(Mark * mark) +{ + gotoLine(mark->line(), mark->column()); +} + ::TextEditor::BaseTextEditorWidget * BaseTextEditor::textEditorWidget() { ::TextEditor::BaseTextEditor *textEditor = |
