Authentication-Results: mail-b.sr.ht; dkim=none Received: from tmailer.gwdg.de (tmailer.gwdg.de [134.76.10.23]) by mail-b.sr.ht (Postfix) with ESMTPS id B26A211EEF9 for <~taiite/public-inbox@lists.sr.ht>; Thu, 2 Dec 2021 00:46:37 +0000 (UTC) Received: from excmbx-13.um.gwdg.de ([134.76.9.222] helo=email.gwdg.de) by mailer.gwdg.de with esmtp (GWDG Mailer) (envelope-from ) id 1msaF8-000207-OA for ~taiite/public-inbox@lists.sr.ht; Thu, 02 Dec 2021 01:46:34 +0100 Received: from m5.localdomain (10.250.9.199) by EXCMBX-13.um.gwdg.de (134.76.9.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P521) id 15.1.2375.17; Thu, 2 Dec 2021 01:46:34 +0100 From: Leon Henrik Plickat To: <~taiite/public-inbox@lists.sr.ht> CC: Leon Henrik Plickat Subject: [PATCH] Allow selecting buffers with Alt+{1..9} Date: Thu, 2 Dec 2021 01:46:16 +0100 Message-ID: <20211202004616.6050-1-leonhenrik.plickat@stud.uni-goettingen.de> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.250.9.199] X-ClientProxiedBy: excmbx-11.um.gwdg.de (134.76.9.220) To EXCMBX-13.um.gwdg.de (134.76.9.222) X-Virus-Scanned: (clean) by clamav --- I am missing from other IRC clients, so I hope this feature is acceptable for senpai. Never wrote go before, so it's possible I am missing something obvious here. app.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app.go b/app.go index 2b0ba82..956c89e 100644 --- a/app.go +++ b/app.go @@ -513,6 +513,7 @@ func (app *App) handleKeyEvent(ev *tcell.EventKey) { } case tcell.KeyBacktab: ok := app.win.InputAutoComplete(-1) + if ok { app.typing() } @@ -535,6 +536,8 @@ func (app *App) handleKeyEvent(ev *tcell.EventKey) { app.win.ScrollDownHighlight() case 'p': app.win.ScrollUpHighlight() + case '1', '2', '3', '4', '5', '6', '7', '8', '9': + app.win.GoToBufferNo(int(ev.Rune()-'0') - 1) } } else { app.win.InputRune(ev.Rune()) -- 2.34.0