[kde-doc-english] [kate] /: add Cursor.setPosition(line, column)
Dominik Haumann
dhaumann at kde.org
Sat Mar 2 21:46:45 UTC 2013
Git commit 5582cabc788d8890dad2a219c86c6f802c8c58d8 by Dominik Haumann.
Committed on 02/03/2013 at 22:41.
Pushed by dhaumann into branch 'master'.
add Cursor.setPosition(line, column)
CCMAIL: holger.danielsson at versanet.de
CCMAIL: michel.ludwig at kdemail.net
CCMAIL: kwrite-devel at kde.org
M +12 -0 doc/kate/advanced.docbook
M +5 -0 part/script/data/libraries/cursor.js
http://commits.kde.org/kate/5582cabc788d8890dad2a219c86c6f802c8c58d8
diff --git a/doc/kate/advanced.docbook b/doc/kate/advanced.docbook
index 9e8484a..045b16b 100644
--- a/doc/kate/advanced.docbook
+++ b/doc/kate/advanced.docbook
@@ -1328,6 +1328,18 @@ Returns a clone of the cursor.</para>
<varlistentry>
<term><synopsis>
+Cursor.setPosition(<parameter>int <replaceable>line</replaceable></parameter>, <parameter>int <replaceable>column</replaceable></parameter>);
+</synopsis></term>
+<listitem><para>
+Sets the cursor position to <replaceable>line</replaceable> and <replaceable>column</replaceable>.</para>
+<para>
+Since: KDE 4.11
+</para></listitem>
+</varlistentry>
+
+
+<varlistentry>
+<term><synopsis>
bool Cursor.isValid();
</synopsis></term>
<listitem><para>
diff --git a/part/script/data/libraries/cursor.js b/part/script/data/libraries/cursor.js
index d533df2..438d049 100644
--- a/part/script/data/libraries/cursor.js
+++ b/part/script/data/libraries/cursor.js
@@ -52,6 +52,11 @@ Cursor.prototype.clone = function() {
return new Cursor(this.line, this.column);
}
+Cursor.prototype.setPosition = function(line, column) {
+ this.line = line;
+ this.column = column;
+}
+
Cursor.prototype.isValid = function() {
return (this.line >= 0) && (this.column >= 0);
}
More information about the kde-doc-english
mailing list