Fix empty buffer being created when opening files using cmdline arguments and allow opening non-existent files

This commit is contained in:
2025-06-07 20:38:36 +03:00
parent fa622762f2
commit 448ebe27cf
4 changed files with 24 additions and 21 deletions
+3 -1
View File
@@ -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()