summaryrefslogtreecommitdiff
path: root/xP/public
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-04-13 04:25:58 +0200
committerPřemysl Eric Janouch <p@janouch.name>2023-04-13 04:26:40 +0200
commitaf5f209c533077a8b1bd469b0edbc63807545659 (patch)
tree2eff20be59bb58649e755095efa2e6ea35a238ea /xP/public
parent6bfe577f1b8ec055d1d903a417ffac152f97751f (diff)
downloadxK-af5f209c533077a8b1bd469b0edbc63807545659.tar.gz
xK-af5f209c533077a8b1bd469b0edbc63807545659.tar.xz
xK-af5f209c533077a8b1bd469b0edbc63807545659.zip
xP: make middle click close buffers
As if they were tabs, to save pointless typing.
Diffstat (limited to 'xP/public')
-rw-r--r--xP/public/xP.js8
1 files changed, 8 insertions, 0 deletions
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)
})