Skip to content

Commit

Permalink
fix: if there is only one key or last key remove anyway
Browse files Browse the repository at this point in the history
Signed-off-by: noteolvides <[email protected]>
  • Loading branch information
Noteolvides committed Nov 21, 2023
1 parent 3ddd249 commit 12053cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kaleidoscope/plugin/DynamicSuperKeys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1085,9 +1085,9 @@ void DynamicSuperKeys::removeKey(Key key)
if (i != keys_index - 1)
{
memmove(&keys[i], &keys[i + 1], (keys_index - i - 1) * sizeof(KeyValue));
keys_index--;
break;
}
keys_index--;
break;
}
}
if (keys_index == 0)
Expand Down

0 comments on commit 12053cb

Please sign in to comment.