mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-25 18:07:07 +09:00
Replace never-assigned var filename with literal empty strings
This commit is contained in:
@@ -158,7 +158,6 @@ func LoadInput(args []string) []*buffer.Buffer {
|
|||||||
// 3. If there is no input file and the input is a terminal, an empty buffer
|
// 3. If there is no input file and the input is a terminal, an empty buffer
|
||||||
// should be opened
|
// should be opened
|
||||||
|
|
||||||
var filename string
|
|
||||||
buffers := make([]*buffer.Buffer, 0, len(args))
|
buffers := make([]*buffer.Buffer, 0, len(args))
|
||||||
|
|
||||||
files := make([]string, 0, len(args))
|
files := make([]string, 0, len(args))
|
||||||
@@ -238,10 +237,10 @@ func LoadInput(args []string) []*buffer.Buffer {
|
|||||||
screen.TermMessage("Error reading from stdin: ", err)
|
screen.TermMessage("Error reading from stdin: ", err)
|
||||||
input = []byte{}
|
input = []byte{}
|
||||||
}
|
}
|
||||||
buffers = append(buffers, buffer.NewBufferFromStringWithCommand(string(input), filename, btype, command))
|
buffers = append(buffers, buffer.NewBufferFromStringWithCommand(string(input), "", btype, command))
|
||||||
} else {
|
} else {
|
||||||
// Option 3, just open an empty buffer
|
// Option 3, just open an empty buffer
|
||||||
buffers = append(buffers, buffer.NewBufferFromStringWithCommand("", filename, btype, command))
|
buffers = append(buffers, buffer.NewBufferFromStringWithCommand("", "", btype, command))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user