Skip to content

The package does not handle UTF-8 prompts properly #13

@Ailrun

Description

@Ailrun

Description

After I used λ as a prompt message, ocaml-linenoise displayed a cursor at a wierd position.
For example, when I typed abc (without a space), my terminal displays something like this.

λ abc _
     ^ Here is a weird space

What you expected

ocaml-linenoise handles λ (and any other UTF-8 encoded characters) in a proper way so that it places characters and the cursor at expected positions like the following.

λ abc_
     ^ This underscore is the cursor.

Reproduction

https://github.com/Ailrun/ocaml-linenoise-issue-13
This repository also includes instructions to reproduce the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions