Change how buffers are handled, fix PgDn key binding running prev-buffer command, fix next/prev-buffer not working correctly

This commit is contained in:
2025-06-14 11:38:02 +03:00
parent 51ec45cd14
commit 12495d4bd9
7 changed files with 82 additions and 52 deletions
+3 -3
View File
@@ -24,16 +24,16 @@ func main() {
}
if len(os.Args) > 1 {
for _, file := range os.Args[1:] {
for i, file := range os.Args[1:] {
b, err := CreateFileBuffer(file, true)
if err != nil {
PrintMessage(window, "Could not open file: "+file)
continue
}
if window.CurrentBuffer.Name == "New File 1" {
delete(Buffers, window.CurrentBuffer.Id)
if i == 0 {
window.CurrentBuffer = b
Buffers = Buffers[1:]
}
}
}