Skip to content

Commit

Permalink
refactor: don't push and pop unnecessarily
Browse files Browse the repository at this point in the history
  • Loading branch information
mecaneer23 committed Jun 11, 2024
1 parent c83cfbb commit 8aa8dea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/acurses.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@ def getch(self) -> int:
keys = _KEYPAD_KEYS if _GETCH.is_blocking() and self._keypad else {}
key = "-".join(map(str, chars))
if key in keys:
self._stored_keys.put(keys[key])
return self._stored_keys.get()
return keys[key]
for char in chars:
self._stored_keys.put(char)
return self._stored_keys.get()
Expand Down

0 comments on commit 8aa8dea

Please sign in to comment.