Re: gets behaviour question
- Posted by RobertS in March
- 554 views
Not sure if this is what you need, but I've written a replacement for prompt_string that allows editing the input line (cursor left/right, home, end, backspace, delete) and also makes it possible to scroll through previous input lines, edit and re-enter them. Length of input line is limited to the current width of the console window.
I'm using it with Phix, but I suppose it works with Euphoria, too. Doesn't work with Linux, though.
I've put it up here: www.hypatia-rpn.net/stuff/prompt_string_ed.e
Input characters are limited to ASCII codes < 128 here, but that's easily changed. It would also be easy to allow, disallow, or convert particular characters, if needed. If you have any questions, please ask.
Robert