Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
g:clever_f_mark_direct extended beyond ASCII (rhysd#74)
* g:clever_f_mark_direct extended beyond ASCII `ch`, instead of just containing a byte (that is ignored when non-ASCII, e.g., coding utf8 or other encoding), now contains a possibly multibyte char. `line` is changed to contain the list of these groupped non-ASCII chars. Tested on utf8. * Update autoload/clever_f.vim thanking rhysd Co-authored-by: Linda_pp <[email protected]> * Update autoload/clever_f.vim thanking rhysd Co-authored-by: Linda_pp <[email protected]> * Update autoload/clever_f.vim thanks rhysd Co-authored-by: Linda_pp <[email protected]> * patching multibyte test for clever_f#mark_direct * updating description of the test * don't return last char of multibyte under cursor CI spotted that bug. I did not yet run CI on my computer (I test on vim in termux app of google play). * Fixed test, added backwards test I don't know why getmatches() is 1-based and not 0-based * all test pass with c-1 in line 161. # tests 81 # passes 81 * skip start of current char getline('.')[c-1] for F After `let [_, l, c, _] = getpos('.')`, first byte of char under cursor is `getline('.')[c-1]`. Hence don't include, and don't skip it, when going backwards. Also, mark_direct has always been slow on very long lines. I commented about optimization, perfect for `f`, and imperfect for `F`. * updated comments, please migrate them to an issue I made better comments. After the pull request passed, I will migrate these comments to an issue (I don't know how to add a new option) * range should stay positive in the future issue * Update clever_f.vim * Update clever_f.vim Co-authored-by: Linda_pp <[email protected]>
- Loading branch information