Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow terminating char to clear search term #1853

Merged
merged 2 commits into from
Nov 2, 2022

Conversation

naosense
Copy link
Contributor

Hi @imsnif, I found something interesting after I walked around the code base.
Because \0 is not allowed here,

// It only allows printable unicode, delete and backspace keys.
let is_updatable = buf.iter().all(|u| matches!(u, 0x20..=0x7E | 0x08 | 0x7F));

it wouldn't step in this branch below.
match needle {
TERMINATING_STRING => {
self.search_term = String::new();
},

I don't know if this is on purpose or just an oversight, if this is on purpose, I will close this pr, thanks.

Related to #1817

@naosense naosense temporarily deployed to cachix October 26, 2022 07:04 Inactive
@imsnif
Copy link
Member

imsnif commented Nov 2, 2022

Good find @naosense !! This seems to make sense to me (and is working for me). @msirringhaus - what do you think? Do you see any downsides to implementing this?

@msirringhaus
Copy link
Contributor

LGTM!

@imsnif imsnif merged commit f334415 into zellij-org:main Nov 2, 2022
@naosense naosense deleted the allow_terminating branch November 2, 2022 14:44
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.

3 participants