diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-10-21 18:50:24 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-10-21 18:50:24 +0200 |
commit | 7eed2e968ca08331bf35d525d107b33485b14049 (patch) | |
tree | 654ab7548172ce0bf0bddce5ef680349d64c6a63 /DevTools | |
parent | 0311e8d50a9f1e74102d4b404feccc3c2f157cd7 (diff) | |
download | serenity-7eed2e968ca08331bf35d525d107b33485b14049.zip |
HackStudio: Show cursor line and column in the statusbar
Diffstat (limited to 'DevTools')
-rw-r--r-- | DevTools/HackStudio/main.cpp | 4 |
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(); } |