mirror of
https://github.com/zyedidia/micro.git
synced 2025-06-18 14:55:38 -04:00
Use basic colors for line numbers
This commit is contained in:
parent
8ab8fd4373
commit
7a41ab2fe1
@ -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;
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user