Open gmx321 opened 7 years ago
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.
In package 1.7.4, the bytes of Chinese character is 1, could you set it as 2 ? Thanks.
Example for test: