summaryrefslogtreecommitdiffstats
path: root/objects/basetexteditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'objects/basetexteditor.cpp')
-rw-r--r--objects/basetexteditor.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/objects/basetexteditor.cpp b/objects/basetexteditor.cpp
index 4e53304..58a427c 100644
--- a/objects/basetexteditor.cpp
+++ b/objects/basetexteditor.cpp
@@ -498,6 +498,24 @@ void BaseTextEditor::deleteRegion(const Position &from, const Position &to)
gotoMark(start);
}
+void BaseTextEditor::gotoDocumentStart()
+{
+ gotoLine(1,0);
+}
+
+void BaseTextEditor::gotoDocumentEnd()
+{
+ gotoLine(lineCount());
+ gotoLineEnd();
+}
+
+int BaseTextEditor::lineCount()
+{
+ if (textEditorWidget())
+ return textEditorWidget()->document()->blockCount();
+ return 0;
+}
+
void BaseTextEditor::indent()
{
if (textEditorWidget())