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

Cannot search for strings with spaces #114

Open
wavexx opened this issue Feb 23, 2015 · 2 comments
Open

Cannot search for strings with spaces #114

wavexx opened this issue Feb 23, 2015 · 2 comments

Comments

@wavexx
Copy link
Member

wavexx commented Feb 23, 2015

Calling gather() at each character in search has the side-effect of stripping spaces while you're still writing them. The backspace handling is also broken, since it should be str[-1].strip().lower() to avoid a similar issue.

Looking at how textpad.gather() is implemented though, it just fetches the text in the current window's buffer so it has no way of knowing the difference. Frankly, curses.textpad is next to useless.... reminds me of the handling as done in bank's terminal forms from the 80'ties, where everything was fixed-size and god-forbid about moving the cursor!

@firecat53
Copy link
Collaborator

firecat53 commented Feb 23, 2015 via email

@wavexx
Copy link
Member Author

wavexx commented Feb 24, 2015

Note that you could "fix" the current code by calling getyx before gather() and setyx() just after to restore the cursor position. I tried it last day, but it feels like punching a dead horse.

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

No branches or pull requests

2 participants