summaryrefslogtreecommitdiff
path: root/commands.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands.go')
-rw-r--r--commands.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/commands.go b/commands.go
index 447340d..626ba00 100644
--- a/commands.go
+++ b/commands.go
@@ -2,6 +2,7 @@ package senpai
import (
"fmt"
+ "strconv"
"strings"
"time"
@@ -478,6 +479,12 @@ func (app *App) handleInput(buffer, content string) error {
func commandDoBuffer(app *App, buffer string, args []string) error {
name := args[0]
+ i, err := strconv.Atoi(name)
+ if err == nil {
+ if app.win.JumpBufferIndex(i) {
+ return nil
+ }
+ }
if !app.win.JumpBuffer(args[0]) {
return fmt.Errorf("none of the buffers match %q", name)
}