aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.html2
-rw-r--r--renderer.js7
-rw-r--r--styles/style.css6
3 files changed, 10 insertions, 5 deletions
diff --git a/index.html b/index.html
index 2b6547c..7f51820 100644
--- a/index.html
+++ b/index.html
@@ -29,7 +29,7 @@
<div class="row footer">
<div id="execution-status" class="exec-idle">Idle</div>
<div id="execution-time"></div>
- <div id="row-count"></div>
+ <div id="cursor-coords"></div>
</div>
</div>
<script>
diff --git a/renderer.js b/renderer.js
index 946d6bb..750447f 100644
--- a/renderer.js
+++ b/renderer.js
@@ -15,7 +15,12 @@ const editorContext = cm(document.getElementById("editor"), {
gutters: ["CodeMirror-linenumbers", "statement-pointer"]
});
-const statementDelimiter = "/"
+editorContext.on("cursorActivity", (instance) => {
+ let coords = instance.getCursor();
+ $("#cursor-coords").text("Ln " + (parseInt(coords.line)+1) + ", Col " + (parseInt(coords.ch)+1));
+});
+
+const statementDelimiter = "/";
let dataTable;
let execStartTime;
diff --git a/styles/style.css b/styles/style.css
index db55827..b24351a 100644
--- a/styles/style.css
+++ b/styles/style.css
@@ -100,9 +100,9 @@ body {
padding: 2px 10px;
}
-#row-count {
- background-color: blue;
- flex-basis: auto;
+#cursor-coords {
+ margin-left: auto;
+ padding-right: 10px;
}
.exec-idle {