Cancel following by <C-[>
This commit is contained in:
parent
c69fdbb14a
commit
8cc7d472df
2 changed files with 7 additions and 2 deletions
|
@ -63,6 +63,7 @@ export default class Follow {
|
|||
this.win.parent.postMessage(JSON.stringify({
|
||||
type: messages.FOLLOW_KEY_PRESS,
|
||||
key: key.key,
|
||||
ctrlKey: key.ctrlKey,
|
||||
}), '*');
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ export default class FollowController {
|
|||
case messages.FOLLOW_RESPONSE_COUNT_TARGETS:
|
||||
return this.create(message.count, sender);
|
||||
case messages.FOLLOW_KEY_PRESS:
|
||||
return this.keyPress(message.key);
|
||||
return this.keyPress(message.key, message.ctrlKey);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,11 @@ export default class FollowController {
|
|||
});
|
||||
}
|
||||
|
||||
keyPress(key) {
|
||||
keyPress(key, ctrlKey) {
|
||||
if (key === '[' && ctrlKey) {
|
||||
this.store.dispatch(followControllerActions.disable());
|
||||
return true;
|
||||
}
|
||||
switch (key) {
|
||||
case 'Enter':
|
||||
this.activate();
|
||||
|
|
Reference in a new issue