mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-28 22:08:12 +09:00
Fix bug with opening empty files
This commit is contained in:
@@ -104,7 +104,11 @@ func LoadInput() []*Buffer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If the file didn't exist, input will be empty, and we'll open an empty buffer
|
// If the file didn't exist, input will be empty, and we'll open an empty buffer
|
||||||
buffers = append(buffers, NewBuffer(input, filename))
|
if input != nil {
|
||||||
|
buffers = append(buffers, NewBuffer(input, filename))
|
||||||
|
} else {
|
||||||
|
buffers = append(buffers, NewBuffer(strings.NewReader(""), filename))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if !isatty.IsTerminal(os.Stdin.Fd()) {
|
} else if !isatty.IsTerminal(os.Stdin.Fd()) {
|
||||||
// Option 2
|
// Option 2
|
||||||
|
|||||||
Reference in New Issue
Block a user