Remove repeat properties
This commit is contained in:
parent
7bdecfdb34
commit
4f342102c0
3 changed files with 5 additions and 6 deletions
|
@ -10,7 +10,7 @@ import * as markActions from './mark';
|
||||||
import * as properties from 'shared/settings/properties';
|
import * as properties from 'shared/settings/properties';
|
||||||
|
|
||||||
// eslint-disable-next-line complexity, max-lines-per-function
|
// eslint-disable-next-line complexity, max-lines-per-function
|
||||||
const exec = (operation, repeat, settings, addonEnabled) => {
|
const exec = (operation, settings, addonEnabled) => {
|
||||||
let smoothscroll = settings.properties.smoothscroll ||
|
let smoothscroll = settings.properties.smoothscroll ||
|
||||||
properties.defaults.smoothscroll;
|
properties.defaults.smoothscroll;
|
||||||
switch (operation.type) {
|
switch (operation.type) {
|
||||||
|
@ -31,13 +31,13 @@ const exec = (operation, repeat, settings, addonEnabled) => {
|
||||||
}), '*');
|
}), '*');
|
||||||
break;
|
break;
|
||||||
case operations.SCROLL_VERTICALLY:
|
case operations.SCROLL_VERTICALLY:
|
||||||
scrolls.scrollVertically(operation.count, smoothscroll, repeat);
|
scrolls.scrollVertically(operation.count, smoothscroll);
|
||||||
break;
|
break;
|
||||||
case operations.SCROLL_HORIZONALLY:
|
case operations.SCROLL_HORIZONALLY:
|
||||||
scrolls.scrollHorizonally(operation.count, smoothscroll, repeat);
|
scrolls.scrollHorizonally(operation.count, smoothscroll);
|
||||||
break;
|
break;
|
||||||
case operations.SCROLL_PAGES:
|
case operations.SCROLL_PAGES:
|
||||||
scrolls.scrollPages(operation.count, smoothscroll, repeat);
|
scrolls.scrollPages(operation.count, smoothscroll);
|
||||||
break;
|
break;
|
||||||
case operations.SCROLL_TOP:
|
case operations.SCROLL_TOP:
|
||||||
scrolls.scrollToTop(smoothscroll);
|
scrolls.scrollToTop(smoothscroll);
|
||||||
|
|
|
@ -49,7 +49,7 @@ export default class KeymapperComponent {
|
||||||
}
|
}
|
||||||
let operation = keymaps.get(matched[0]);
|
let operation = keymaps.get(matched[0]);
|
||||||
let act = operationActions.exec(
|
let act = operationActions.exec(
|
||||||
operation, key.repeat, state.setting, state.addon.enabled
|
operation, state.setting, state.addon.enabled
|
||||||
);
|
);
|
||||||
this.store.dispatch(act);
|
this.store.dispatch(act);
|
||||||
this.store.dispatch(inputActions.clearKeys());
|
this.store.dispatch(inputActions.clearKeys());
|
||||||
|
|
|
@ -18,7 +18,6 @@ const fromKeyboardEvent = (e) => {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
key: modifiedKeyName(e.key),
|
key: modifiedKeyName(e.key),
|
||||||
repeat: e.repeat,
|
|
||||||
shiftKey: shift,
|
shiftKey: shift,
|
||||||
ctrlKey: e.ctrlKey,
|
ctrlKey: e.ctrlKey,
|
||||||
altKey: e.altKey,
|
altKey: e.altKey,
|
||||||
|
|
Reference in a new issue