summaryrefslogtreecommitdiff
path: root/DevTools
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-10-21 18:50:24 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-10-21 18:50:24 +0200
commit7eed2e968ca08331bf35d525d107b33485b14049 (patch)
tree654ab7548172ce0bf0bddce5ef680349d64c6a63 /DevTools
parent0311e8d50a9f1e74102d4b404feccc3c2f157cd7 (diff)
downloadserenity-7eed2e968ca08331bf35d525d107b33485b14049.zip
HackStudio: Show cursor line and column in the statusbar
Diffstat (limited to 'DevTools')
-rw-r--r--DevTools/HackStudio/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/DevTools/HackStudio/main.cpp b/DevTools/HackStudio/main.cpp
index 1deacd2aec..4243aaca3b 100644
--- a/DevTools/HackStudio/main.cpp
+++ b/DevTools/HackStudio/main.cpp
@@ -57,6 +57,10 @@ int main(int argc, char** argv)
auto statusbar = GStatusBar::construct(widget);
+ text_editor->on_cursor_change = [&] {
+ statusbar->set_text(String::format("Line: %d, Column: %d", text_editor->cursor().line(), text_editor->cursor().column()));
+ };
+
window->show();
return app.exec();
}