mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 19:25:10 +00:00
HackStudio: Show cursor line and column in the statusbar
This commit is contained in:
parent
0311e8d50a
commit
7eed2e968c
1 changed files with 4 additions and 0 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue