Skip to content

Fixed the behavior of backspace key when using search_key=None#95

Open
anishsane wants to merge 1 commit intoIngoMeyer441:developfrom
anishsane:backspace-search
Open

Fixed the behavior of backspace key when using search_key=None#95
anishsane wants to merge 1 commit intoIngoMeyer441:developfrom
anishsane:backspace-search

Conversation

@anishsane
Copy link

When search_key=None, if we press backspace as the first character, the word is entered literally ("backspace") as the search term.

If the search_key is None and backspace is pressed, do nothing. (Do not set the search_key to "backspace".)

Partially resolves #41 (The issue with accented characters mentioned in the issue description is not handled.)

When search_key=None, if we press backspace as the first character, the
word is entered literally ("backspace") as the search term.

If the search_key is None and backspace is pressed, do nothing. (Do not
set the search_key to "backspace".)

Partially resolves IngoMeyer441#41
(The issue with accented characters mentioned in the issue description is not
handled.)
@joekohlsdorf
Copy link

tab is causing the same problem and as you know left and right cursors cause crashes, potentially there are others as well

So the definitive solution is probably to only allow printable characters with if wcswidth(next_key) >= 0 like it is done when adding to search text. When I have some time I might give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pressing backspace when passing None as Search Key prints the word backspace as regex.

2 participants