atom-sublime-select icon indicating copy to clipboard operation
atom-sublime-select copied to clipboard

About bytes of Chinese character

Open gmx321 opened this issue 8 years ago • 1 comments

In package 1.7.4, the bytes of Chinese character is 1, could you set it as 2 ? Thanks.

Example for test:

exm1模3多开柱:=BARSLAST(模3多头起点); exm22模3多平柱:=BARSLAST(模3多头终点); exm333模3空开柱:=BARSLAST(模3空头起点); exm4444模3空平柱:=BARSLAST(模3空头终点);

gmx321 avatar Jun 20 '17 15:06 gmx321

Oof, thats tricky. I currently use the editor.getDefaultCharWidth() and use it to figure out how long the selection should be in order to support selecting beyond the current line length.

Heres my function https://github.com/bigfive/atom-sublime-select/blob/master/lib/editor-handler.coffee#L87-L98

Heres atoms function that takes differing char widths into account (but doesn't allow selecting beyond the current line length) https://github.com/atom/atom/blob/d2c38ac36a46c067b7f1fe1edc41bcf7b4b13e73/src/text-editor-component.js#L2379-L2456

Maybe I could call the atom version per line or something. If anyone wants to try tackling that I'd love it.

bigfive avatar Sep 28 '18 08:09 bigfive