SpartanJ / ecode

Lightweight multi-platform code editor designed for modern hardware with a focus on responsiveness and performance.
MIT License
941 stars 13 forks source link

FR: `Open File` improvement #247

Closed ghost closed 7 months ago

ghost commented 7 months ago

Currently, the default focus is not in the File Name text box. If there are too many files and you know exactly the name of the file you want to open, and you want to type its name, strange things happen. First, because focus is not in the File Name text box, you can't type the full file name. The selector can only match the first character of the file name. Now, you manually click into the File Name text box and type the full file name. The selector doesn't select the file with the full file name for you. It still selects the previous file it selected before you click into the File Name text box and type the full file name. You expect if you hit enter with the full file name in the text box, it will open the correct file? No. Please notice the selector. It still selects the wrong file. So, when you hit enter, it will open that file.

SpartanJ commented 7 months ago

Currently, the default focus is not in the File Name text box. If there are too many files and you know exactly the name of the file you want to open, and you want to type its name, strange things happen.

Mmh but nothing strange should happen, it will match what you write:

https://github.com/SpartanJ/ecode/assets/650416/8bd0e154-3099-409f-8dbe-e08506bc7592

Bottom right you can see what I'm writing and what's selecting, it's working fine.

First, because focus is not in the File Name text box, you can't type the full file name.

Focus should always be on the file list, matching should work on the file list.

The selector can only match the first character of the file name.

This is not the case, BUT maybe if you write too slow this is the case because the matcher will reset, maybe I should increase the reset time length.

The selector doesn't select the file with the full file name for you. It still selects the previous file it selected before you click into the File Name text box and type the full file name.

Also not the case, but it will select the first element of the match if starts the matcher from a single character after reset.

SpartanJ commented 7 months ago

I tested a little bit further, it's the reset time that it's to low, I'll increase it and it should work fine.

SpartanJ commented 7 months ago

@iahung3 can you build dev and try again? Let me know if that helps.

ghost commented 7 months ago

@iahung3 can you build dev and try again? Let me know if that helps.

The selector can now match the full file name, not just the first character like before. Thank you.