elementary / elementary/calculator

Clicking buttons that insert multi byte utf-8 characters makes the cursor skip positions

Open
#107 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Vala
Stars
83
Forks
32
Avg merge
2d 3h
Merged PRs (30d)
3

Description

Pressing buttons for ×, ÷, −, √ and π while in the middle of a number is broken, it makes the cursor move ahead from it's actual position.

The reason is these are Unicode characters that get encoded into a multi byte string, then we increase the cursor position by the number of bytes not the number of Unicode characters.

Note that we can't just increase by 1 always, because trigonometric functions do contain multiple Unicode characters.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.