From 7eed2e968ca08331bf35d525d107b33485b14049 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 21 Oct 2019 18:50:24 +0200 Subject: [PATCH] HackStudio: Show cursor line and column in the statusbar --- DevTools/HackStudio/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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(); }