HackStudio: Show cursor line and column in the statusbar

This commit is contained in:
Andreas Kling 2019-10-21 18:50:24 +02:00
commit 7eed2e968c
Notes: sideshowbarker 2024-07-19 11:35:46 +09:00

View file

@ -57,6 +57,10 @@ int main(int argc, char** argv)
auto statusbar = GStatusBar::construct(widget); 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(); window->show();
return app.exec(); return app.exec();
} }