antirez/linenoise

character shift if prompt string is empty ("")

Opened this issue · 1 comments

Noticed a weird behavior if the prompt char array is empty (""), the input string shifts 1 char to the left after the initial backspace. Also, the cursor does not return to column position 0. The input buffer is still returned normally (i.e. all chars printed to current terminal before return match the returned string), but it does look weird (indicating that this might be an issue with the line refresh function(s). =P

I have the same behaviour when the prompt is color coded using standard ANSI rules (here with the OCaml bidings of Linenoise)
image