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

Open File dialog: type to find resets after each letter. #158

Closed
alex-smartptr opened this issue Feb 18, 2025 · 7 comments
Closed

Open File dialog: type to find resets after each letter. #158

alex-smartptr opened this issue Feb 18, 2025 · 7 comments

Comments

@alex-smartptr
Copy link

Hi there.

In the old nedit, I could type the first few characters of a filename, and the "Open File" dialog would select the first matching file for me. That was super-useful when dealing with directories with many, many file entries.

xnedit only searches for a single keystroke. So if I typed "C" "A" "T", hoping to find files such as "catalogue.h", it has actually highlighted the first file that starts with the letter "T".

Looks like the old nedit had a time-out somewhere. If I paused for a second or two, a new sequence of keystrokes would be interpreted as a new search, rather than an extension of the old one.

Any chance of resurrecting the old behaviour?

(Excellent work by the way - xnedit is now my daily driver.)

@unixwork
Copy link
Owner

Yes there is a chance. I didn't know about this behaviour and it absolutely makes sense to implement it. I will try to implement it in the next days.

@unixwork
Copy link
Owner

The previous nedit behavior is restored.

@alex-smartptr
Copy link
Author

Amazing.

Out of interest, did you pull that code out of a previous version of Nedit, or did you write it from scratch?

@unixwork
Copy link
Owner

I wrote it mostly from scratch, not all old code could be reused.

@alex-smartptr
Copy link
Author

Just tested it, and the behaviour isn't quite right.

Typing multiple characters correctly selects an appropriate entry in the Files: field. But when I press the Return key, I expect it to open the selected file. Instead, pressing Return causes the selection to shift to a different entry - often it's the last entry in the list, sometimes it's the entry immediately before the one I wanted, other times it seems to select an entirely random entry.

@unixwork
Copy link
Owner

The return key should work now.

@alex-smartptr
Copy link
Author

Tested and working. Thank you so much.

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