diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2023-04-13 04:25:58 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2023-04-13 04:26:40 +0200 |
commit | af5f209c533077a8b1bd469b0edbc63807545659 (patch) | |
tree | 2eff20be59bb58649e755095efa2e6ea35a238ea /xP/public | |
parent | 6bfe577f1b8ec055d1d903a417ffac152f97751f (diff) | |
download | xK-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.js | 8 |
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) }) |