Splitter: Fix keyboard repeat behavior

pull/5206/head
Melloware 2024-02-04 12:31:14 -05:00 committed by GitHub
parent 9a29cbc990
commit ecd5cb940d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 5 deletions

View File

@ -158,14 +158,16 @@ export default {
this.onResize(event, step, true);
},
setTimer(event, index, step) {
this.clearTimer();
this.timer = setTimeout(() => {
this.repeat(event, index, step);
}, 40);
if (!this.timer) {
this.timer = setInterval(() => {
this.repeat(event, index, step);
}, 40);
}
},
clearTimer() {
if (this.timer) {
clearTimeout(this.timer);
clearInterval(this.timer);
this.timer = null;
}
},
onGutterKeyUp() {