mirror of
https://github.com/EnumeratedDev/typer.git
synced 2026-09-16 05:36:10 +00:00
Fix empty buffer being created when opening files using cmdline arguments and allow opening non-existent files
This commit is contained in:
+3
-1
@@ -46,7 +46,9 @@ func CreateWindow() (*Window, error) {
|
||||
}
|
||||
|
||||
// Create empty buffer if nil
|
||||
window.textArea.CurrentBuffer = CreateBuffer("New File 1")
|
||||
if window.textArea.CurrentBuffer == nil {
|
||||
window.textArea.CurrentBuffer = CreateBuffer("New File 1")
|
||||
}
|
||||
|
||||
// Create tcell screen
|
||||
screen, err := tcell.NewScreen()
|
||||
|
||||
Reference in New Issue
Block a user