puremourning / vimspector

vimspector - A multi-language debugging system for Vim
http://puremourning.github.io/vimspector-web
Apache License 2.0
4.11k stars 175 forks source link

Offsets should be UTF-16 code units #96

Open puremourning opened 4 years ago

puremourning commented 4 years ago

Describe the bug

The DAP uses utf-16 code units for offsets (ref: https://github.com/microsoft/debug-adapter-protocol/issues/91).

Vimspector uses probably a mix of byte offsets and unicode codepoints.

To Reproduce

Add a line with a multi-byte character and a language (like TCL) that provides the column offset.

Expected behavior

Offsets are interpreted correctly according to the appropriate notion of "characters"

Actual behaviour

Not sure yet, i haven't tried it, but i expect tracebacks

puremourning commented 2 years ago

This has been clarified in https://github.com/microsoft/debug-adapter-protocol/issues/285; the result is the same, it's UTF16 code units. Shrug.