Open ShaneEverittM opened 1 year ago
Dang, not sure how I missed that when looking for duplicates! Sorry!
Highlighter
adds some style).But neither 1 or 2 are compatible with continuation prompt (see https://github.com/kkawakam/rustyline/pull/372#issuecomment-626295074).
The implementations for Renderer::calculate_position differed slightly between unix and Windows. Notably, the Windows implementation did not use tty::width, but instead used UnicodeWidthStr::width. It seems that the latter did not correctly compute the length.
For context, this bug was discovered in the boa JS interpreter, where on Windows the prompt being bold and blue caused the cursor to be offset by 9 characters.