From af5f209c533077a8b1bd469b0edbc63807545659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Thu, 13 Apr 2023 04:25:58 +0200 Subject: xP: make middle click close buffers As if they were tabs, to save pointless typing. --- xP/public/xP.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xP/public/xP.js b/xP/public/xP.js index 11b4b69..64fa542 100644 --- a/xP/public/xP.js +++ b/xP/public/xP.js @@ -465,6 +465,14 @@ let BufferList = { // The role makes it selectable in VIM-like browser extensions. return m('.item[role=tab]', { onclick: event => bufferActivate(name), + onauxclick: event => { + if (event.button == 1) + rpc.send({ + command: 'BufferInput', + bufferName: name, + text: '/buffer close', + }) + }, class: classes.join(' '), }, displayName) }) -- cgit v1.2.3