xP: make middle click close buffers
As if they were tabs, to save pointless typing.
This commit is contained in:
parent
6bfe577f1b
commit
af5f209c53
|
@ -465,6 +465,14 @@ let BufferList = {
|
||||||
// The role makes it selectable in VIM-like browser extensions.
|
// The role makes it selectable in VIM-like browser extensions.
|
||||||
return m('.item[role=tab]', {
|
return m('.item[role=tab]', {
|
||||||
onclick: event => bufferActivate(name),
|
onclick: event => bufferActivate(name),
|
||||||
|
onauxclick: event => {
|
||||||
|
if (event.button == 1)
|
||||||
|
rpc.send({
|
||||||
|
command: 'BufferInput',
|
||||||
|
bufferName: name,
|
||||||
|
text: '/buffer close',
|
||||||
|
})
|
||||||
|
},
|
||||||
class: classes.join(' '),
|
class: classes.join(' '),
|
||||||
}, displayName)
|
}, displayName)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue