micro-editor / micro-editor/micro

Hangul text gets cut off by scroll bar when softwrap is on

Open
#2,453 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
29.6k
Forks
1.4k
Avg merge
2d 18h
Merged PRs (30d)
10

Description

Description of the problem or steps to reproduce

  1. Open a blank file in micro
  2. Enter command mode and type set softwrap true to enable linewrapping
  3. Paste in a long paragraph of hangul (Korean) text, such as "비트코인에서 2017년 12월 10일 하드 포크될 예정인 알트코인이라고 알려졌었던 비트코인 플래티넘(Bitcoin Platinum)을 내세운 사기극(이자 나무위키를 이용한 허위광고). 개발진 측에선 사기가 아니라 실제로 하드 포크가 될 알트코인이며 후술할 사건은 일부 개발자의 폭주라고 주장하고 있었으나, 2018년 기준으로 완벽하게 스캠코인이요, 사기 사건임이 확정되었다."
  4. Depending on how the window is sized, some characters get cut off:
    image

The pink dots indicate dropped characters.

I think the issue is that hangul (as well as Chinese) characters typically take up the width of 1.5 monospace Latin characters, so when a character at the end of a line can only be displayed partially, it is simply dropped.

Specifications

Micro version: 2.0.1-1 installed via apt install (micro -version reports Version: 0.0.0-unknown.)
OS: Ubuntu 20.04.4 LTS x86_64
Terminal: GNOME Terminal 3.36.2

(I have the same issue in Alacritty terminal on Arch.)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in micro by enabling set softwrap true and entering the provided long Hangul paragraph, resizing the terminal to vary the wrapping boundary. Trace the softwrap and terminal rendering path to determine where partially fitting wide characters are dropped. Done means Hangul and other wide characters remain intact at line ends without regression for Latin text.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.