diff --git a/src/main.d b/src/main.d index 94105dbf..822ecec8 100644 --- a/src/main.d +++ b/src/main.d @@ -12,10 +12,7 @@ void main(string[] args) { if (args.length > 1) { filename = args[1]; - if (!exists(filename)) { - File file = File(filename, "w"); - file.close(); - } else { + if (exists(filename)) { if (isDir(filename)) { writeln(filename, " is a directory"); return; diff --git a/src/view.d b/src/view.d index 77b1048a..908fdb3c 100644 --- a/src/view.d +++ b/src/view.d @@ -182,12 +182,12 @@ class View { // Write the line number string lineNum = to!string(i + topline + 1); foreach (_; 0 .. maxLength - lineNum.length) { - setCell(cast(int) x++, cast(int) y, ' ', Color.basic, Color.black); + setCell(cast(int) x++, cast(int) y, ' ', Color.basic, Color.basic); } foreach (dchar ch; lineNum) { - setCell(cast(int) x++, cast(int) y, ch, Color.basic, Color.black); + setCell(cast(int) x++, cast(int) y, ch, Color.basic, Color.basic); } - setCell(cast(int) x++, cast(int) y, ' ', Color.basic | Attribute.bold, Color.black); + setCell(cast(int) x++, cast(int) y, ' ', Color.basic, Color.basic); // Write the line foreach (dchar ch; line) {