Skip to content

Commit

Permalink
remove normalization
Browse files Browse the repository at this point in the history
This looks like normalization added in the wrong place, that went
unnoticed because it went in with a batch of fixes.
  • Loading branch information
MattWiethoff committed Jun 25, 2022
1 parent b8a9328 commit 71f8cb8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
9 changes: 0 additions & 9 deletions client/src/main/execute/insert-history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,4 @@ export default class InsertHistory {

return value.text;
}

normalize(text: string, app: string) {
const value = this.latest(app);
if (value && text.startsWith(value)) {
text = text.substring(value.length);
}

return text;
}
}
5 changes: 2 additions & 3 deletions client/src/main/execute/native-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@ class TypeText implements Operation {
) {}

async execute() {
const text = this.insertHistory.normalize(this.text, this.active.app);
this.insertHistory.add(text, this.active.app);
await this.system.typeText(text, this.active.app);
this.insertHistory.add(this.text, this.active.app);
await this.system.typeText(this.text, this.active.app);
}

keystrokesCount(): number {
Expand Down

0 comments on commit 71f8cb8

Please sign in to comment.