question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some long UTF8 characters causing cursor to drift

See original GitHub issue

Neovim:

NVIM v0.4.3
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/tmp/neovim-20191107-13403-1or2rj3/neovim-0.4.3/build/config -I/tmp/neovim-20191107-13403-1or2rj3/neovim-0.4.3/src -I/usr/local/include -I/tmp/neovim-20191107-13403-1or2rj3/neovim-0.4.3/deps-build/include -I/usr/local/opt/gettext/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/tmp/neovim-20191107-13403-1or2rj3/neovim-0.4.3/build/src/nvim/auto -I/tmp/neovim-20191107-13403-1or2rj3/neovim-0.4.3/build/include
Compiled by brew@Mojave.local

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.4.3/share/nvim"

Code:

Version: 1.41.1
Commit: 26076a4de974ead31f97692a0d32f90d735645c0
Date: 2019-12-18T14:57:51.166Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 18.7.0

The problem is quite subtle but when the editor encounters UTF8 characters longer than 2*8bits, the cursor is drifted forward by 1 position. Screen Shot 0002-01-09 at 11 50 11 AM Here character has UTF8 code E1 B5 A9. This drift affects x and D operations in normal mode also.

Plain nvim seems to be fine with that so I suppose it’s a problem with the plugin? (2*8bits-characters like φ(CF 86) works also fine.)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
xrq-physcommented, Jan 10, 2020

Thanks for explanation and the fix!

0reactions
asvetliakovcommented, Jan 10, 2020

Didn’t test esc at the end of the line, as you said, didn’t work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Some long UTF8 characters causing cursor to drift #142 - GitHub
The problem is quite subtle but when the editor encounters UTF8 characters longer than 2*8bits , the cursor is drifted forward by 1...
Read more >
Mouse cursor drifting - Microsoft Community
Yesterday my mouse cursor started 'drifting' or more accurately twitching itself slowly towards the top left of my screen.
Read more >
My mouse cursor is drifting when I'm not applying input. Code ...
My guess is that there is some noise in the cursor X/Y position that is causing the jerking, which is so small it's...
Read more >
Why does Notepad++ display some Unicode characters as ...
When in Notepad++, if the cursor is currently at the end of the first line, many of the unicode chars render as boxes:....
Read more >
Keyboard Control - mpv.io
Play files according to a playlist file. Supports some common formats. If no format is detected, it will be treated as list of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found