1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:58:11 +00:00

HackStudio: Optionally pass line & column to open_file

This makes it easier to open a file at a specific location.
This commit is contained in:
Itamar 2021-08-27 16:18:00 +03:00 committed by Andreas Kling
parent 5cd030568f
commit 8fc9ec942e
3 changed files with 5 additions and 4 deletions

View file

@ -132,8 +132,7 @@ void open_file(const String& filename)
void open_file(const String& filename, size_t line, size_t column)
{
s_hack_studio_widget->open_file(filename);
s_hack_studio_widget->current_editor_wrapper().editor().set_cursor({ line, column });
s_hack_studio_widget->open_file(filename, line, column);
}
RefPtr<EditorWrapper> current_editor_wrapper()