annotate_models icon indicating copy to clipboard operation
annotate_models copied to clipboard

Use unicode-display_width on calculating display width

Open Bugfire opened this issue 5 years ago • 0 comments

Annotate model create wrong indentation when column comment has some characters.

  • Almost kanji characters are represented by 3bytes.
  • Some normal-width symbols are represented by 3bytes.
  • Emojis and some kanji characters are represented by 4bytes.

'unicode-display_width' gem is working for calculating width properly for me.

Following is a indented spec diff with some characters.

screenshot2

Following is the result of rake spec on current develop branch and above spec diff.

screenshot1

Calculating width by the gem and above spec diff work properly.

Bugfire avatar Aug 04 '20 15:08 Bugfire