Skip to content

Commit

Permalink
Start a new word if word delete happen
Browse files Browse the repository at this point in the history
Fixes #115
  • Loading branch information
huytd committed May 12, 2024
1 parent 3e21648 commit ce6b625
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,11 @@ fn event_handler(
INPUT_STATE.new_word();
}
KEY_DELETE => {
INPUT_STATE.pop();
if !modifiers.is_empty() && !modifiers.is_shift() {
INPUT_STATE.new_word();
} else {
INPUT_STATE.pop();
}
}
c => {
if "()[]{}<>/\\!@#$%^&*-_=+|~`,.;'\"/".contains(c)
Expand Down

0 comments on commit ce6b625

Please sign in to comment.