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
+1 -1
View File
@@ -53,7 +53,7 @@ func initTopMenu() {
PrintMessage(window, fmt.Sprintf("File already open! Switching to buffer: %s", openBuffer.Name))
window.textArea.CurrentBuffer = openBuffer
} else {
newBuffer, err := CreateFileBuffer(input)
newBuffer, err := CreateFileBuffer(input, false)
if err != nil {
PrintMessage(window, fmt.Sprintf("Could not open file: %s", err.Error()))
return