mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 18:15:06 +00:00
TextEditor: Open an empty document by default.
This commit is contained in:
parent
f8b72ab3ab
commit
a738b5cb69
2 changed files with 7 additions and 3 deletions
|
@ -29,8 +29,9 @@ int main(int argc, char** argv)
|
|||
statusbar->set_text(String::format("Line: %d, Column: %d", editor.cursor().line(), editor.cursor().column()));
|
||||
};
|
||||
|
||||
String path = argc < 2 ? "/home/anon/ReadMe.md" : argv[1];
|
||||
{
|
||||
String path = "/tmp/TextEditor.save.txt";
|
||||
if (argc >= 2) {
|
||||
path = argv[1];
|
||||
StringBuilder builder;
|
||||
int fd = open(path.characters(), O_RDONLY);
|
||||
if (fd < 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue