rustyline
rustyline copied to clipboard
Replace line buffer contents on update
I'm using rustyline for kalker and would like to implement automatic completion of symbols and other things like indentation, like on the web version. For me, an easy way would be to simply replace the text with the modified version everytime it's edited. This makes it fairly easy to deal with eg. indenting a line by a certain amount depending on where a certain symbol is located on the line above. I haven't found a way to do this though. Is it possible? Could it be possible in the future?
No there is no such thing currently in rustyline
.
But this feature seems to already exists in replxx
: see modify_callback_t.
And rustyline
needs something similar to this to solve other issues. And this is where replxx
calls call_modify_callback
.
You should also check if such feature is supported by reedline
.
I see. I will see if reedline
supports it. Thanks!