mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-11 23:22:41 +09:00
Read one line for empty strings
This commit is contained in:
@@ -70,6 +70,10 @@ func NewLineArray(reader io.Reader) *LineArray {
|
||||
var buf bytes.Buffer
|
||||
tee := io.TeeReader(reader, &buf)
|
||||
numlines, _ := lineCounter(tee)
|
||||
if numlines == 0 {
|
||||
numlines = 1
|
||||
}
|
||||
|
||||
la.lines = make([]Line, numlines)
|
||||
|
||||
br := bufio.NewReader(&buf)
|
||||
|
||||
Reference in New Issue
Block a user