1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:47:46 +00:00

TextEditor: Specify the starting line and column number using colons

This allows the user to specify a specific line and column number to
start at when opening a file in TextEditor through the terminal, by
adding a colon after the file name.

For example, `TextEditor ReadMe.md:10:5` will open ReadMe.md and put
the cursor on line 10 at column 5.

To ensure that the user isn't trying to open a file that actually has
colons in its name, it checks if the file exists before parsing.

Replaces the feature added in b474f49164
Closes #5589
This commit is contained in:
ry755 2021-03-05 23:13:22 -08:00 committed by Linus Groh
parent 68a542623f
commit 8af7cda17a
4 changed files with 94 additions and 8 deletions

View file

@ -2,6 +2,7 @@ compile_gml(TextEditorWindow.gml TextEditorWindowGML.h text_editor_window_gml)
set(SOURCES
main.cpp
FileArgument.cpp
MainWidget.cpp
TextEditorWindowGML.h
)