itchyny / vim-cursorword

Underlines the word under the cursor
http://www.vim.org/scripts/script.php?script_id=5100
MIT License
611 stars 36 forks source link

Error when cursor on unicode char #10

Closed yevhen-m closed 7 years ago

yevhen-m commented 7 years ago
Error detected while processing function cursorword#matchadd:
line   11:
E16: Invalid range

Cursorword does not play well with unicode chars. When I move cursor on say ē, then error happens.

itchyny commented 7 years ago

I cannot reproduce the error. Please let me know the result of :version and :echo [&enc, &fenc].

yevhen-m commented 7 years ago
NVIM v0.2.0
Build type: RelWithDebInfo
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_MSGPACK_HAS_FLOAT32 -O2 -g -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -I/tmp/neovim-20170503-20396-1cdaxjw/neovim-0.2.0/build/config -I/tmp/neovim-20170503-20396-1cdaxjw/neovim-0.2.0/src -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/include -I/usr/include -I/tmp/neovim-20170503-20396-1cdaxjw/neovim-0.2.0/build/src/nvim/auto -I/tmp/neovim-20170503-20396-1cdaxjw/neovim-0.2.0/build/include

Optional features included (+) or not (-): +acl   +iconv    +jemalloc +tui
For differences from Vim, see :help vim-differences

['utf-8', '']

itchyny commented 7 years ago

Is there any small sample text to reproduce the error?

itchyny commented 7 years ago

Ahh, I found that the plugin has problem with set re=1...

itchyny commented 7 years ago

Now I have fixed the error.

yevhen-m commented 7 years ago

Great, thanks.

Your plugin is great. I enjoy it very much. Thanks a lot!

itchyny commented 7 years ago

Thank you.