mirror of
https://github.com/EnumeratedDev/typer.git
synced 2026-09-16 13:36:12 +00:00
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:
+3
-3
@@ -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:]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user