johnnovak / illwill

A curses inspired simple cross-platform console library for Nim
Do What The F*ck You Want To Public License
398 stars 27 forks source link

Cursor update #11

Closed Synth9283 closed 4 years ago

Synth9283 commented 4 years ago

Greetings. I've been trying to create a text editor with illwill. However, it seems that I am unable to see the cursor position change when changing it with the setCursorPos() proc. Also, I couldn't find any proc to delete a char kind of like the one that exists in ncurses.h delch(). In addition, would it be possible to get the characters from a set location such as with a proc that accepts the location and returns a char or a string? Thank you!

enthus1ast commented 4 years ago

to delete a character you must overwrite it. i think you should have your textstate in a rope and render this out with illwill.

Same goes for the cursor, at first i would try to actually show the cursor:

showCursor()

then i would store the cursor position, and render this out with illwill, maybe with

styleBlink
Synth9283 commented 4 years ago

Okay, thank you!