micro-editor / micro-editor/micro
Line length wrong for background color (unicode)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 29.6k
- Forks
- 1.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 10
Description
Follow on from #872 where the Thai text in http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt
at lines 123-130 seems to render fine - but not necessarily the background coloring.
This seems to be working now in micro 2.0.14 on macOS under WezTerm.
However there is some oddity on the Apple Terminal (testing on macOS 12.7.6) with the background colour on the right hand end of those lines. It is as though the length calculation for drawing the background colour has worked out shorter than the screen width:
This also affects line 57, starting "STARGΛ̊TE SG-1" (TV show Stargate SG-1 with symbolic replacement for A). Here deleting the a-vector and b-vector entries "fixes" it, suggesting the arrow-above modification breaks.
Trying to select the a-vector and b-vector with the mouse is also glitching. For example, a triple click selects the line but appears to only highlight up to half the b-vector. Again, specific to the Apple Terminal, WezTerm was fine.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file, test, or entry point is named. Start by reproducing the Unicode rendering and mouse-selection issues on Apple Terminal using the linked UTF-8 demo lines, then compare behavior with WezTerm; done means background coloring reaches the expected width and selection covers the full affected text without regressing the working case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100