{"action":"created","issue":{"url":"https://api.github.com/repos/vim/vim/issues/2647","repository_url":"https://api.github.com/repos/vim/vim","labels_url":"https://api.github.com/repos/vim/vim/issues/2647/labels{/name}","comments_url":"https://api.github.com/repos/vim/vim/issues/2647/comments","events_url":"https://api.github.com/repos/vim/vim/issues/2647/events","html_url":"https://github.com/vim/vim/issues/2647","id":297453697,"number":2647,"title":"UTF emojis break lines wrapping","user":{"login":"nicolas-ivanov","id":2272790,"avatar_url":"https://avatars1.githubusercontent.com/u/2272790?v=4","gravatar_id":"","url":"https://api.github.com/users/nicolas-ivanov","html_url":"https://github.com/nicolas-ivanov","followers_url":"https://api.github.com/users/nicolas-ivanov/followers","following_url":"https://api.github.com/users/nicolas-ivanov/following{/other_user}","gists_url":"https://api.github.com/users/nicolas-ivanov/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolas-ivanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolas-ivanov/subscriptions","organizations_url":"https://api.github.com/users/nicolas-ivanov/orgs","repos_url":"https://api.github.com/users/nicolas-ivanov/repos","events_url":"https://api.github.com/users/nicolas-ivanov/events{/privacy}","received_events_url":"https://api.github.com/users/nicolas-ivanov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-15T13:54:20Z","updated_at":"2018-02-18T03:13:47Z","closed_at":null,"author_association":"NONE","body":"Consider a UTF file with an emoji in a string, for example:\r\n\r\n```\r\n😃1234567890 1234567890 1234567890 1234567890\r\n```\r\n\r\nIf the string is too long for one line vim will wrap it up to the next line. \r\nHowever if there is an emoji anywhere in this string, vim will duplicate a symbol at the wrapping point:\r\n\r\n```\r\n😃1234567890 1234567890 1234567890 12345677\r\n890\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/vim/vim/issues/comments/366489289","html_url":"https://github.com/vim/vim/issues/2647#issuecomment-366489289","issue_url":"https://api.github.com/repos/vim/vim/issues/2647","id":366489289,"user":{"login":"ZyX-I","id":322097,"avatar_url":"https://avatars3.githubusercontent.com/u/322097?v=4","gravatar_id":"","url":"https://api.github.com/users/ZyX-I","html_url":"https://github.com/ZyX-I","followers_url":"https://api.github.com/users/ZyX-I/followers","following_url":"https://api.github.com/users/ZyX-I/following{/other_user}","gists_url":"https://api.github.com/users/ZyX-I/gists{/gist_id}","starred_url":"https://api.github.com/users/ZyX-I/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZyX-I/subscriptions","organizations_url":"https://api.github.com/users/ZyX-I/orgs","repos_url":"https://api.github.com/users/ZyX-I/repos","events_url":"https://api.github.com/users/ZyX-I/events{/privacy}","received_events_url":"https://api.github.com/users/ZyX-I/received_events","type":"User","site_admin":false},"created_at":"2018-02-18T03:13:47Z","updated_at":"2018-02-18T03:13:47Z","author_association":"NONE","body":"This looks like a usual problem with either foreign glyphs rendering or difference in opinion about glyph width between Vim and terminal emulator. In your case tmux adds another layer of possible problems, though rather limited in scope: try doing vertical split in tmux, use `xclip -o -sel clip` in *left* pane with this text in clipboard and watch the pane separator. You may need to trigger some specific lines redrawing: I see separator disappear on the *previous* line, but only after I enter copy mode, `refresh-client` command also works.\r\n\r\nNote: by foreign glyphs rendering I mean rendering of glyphs taken from font other then currently used one. Happens when current font has no needed glyph. Known to be a rather big problem in konsole (at least in my setup, though I heard that not only mine).\r\n\r\nSo to reproduce the issue for sure you need to know not just Vim version and terminal, but\r\n\r\n- Vim version.\r\n- Terminal emulator and its version.\r\n- Versions of whatever software is between Vim and terminal, if any (I mean tmux).\r\n- Font library with version.\r\n- Font with version.\r\n- Versions of whatever libraries terminal emulator and intermediate software are using to determine glyph width. There are lost of candidates here: not sure, but glibc (but AFAIR not just any libc); icu (rarely used based on what I know); or one of the softwares from the above list: at least Vim has its own functions that deal with unicode, Python also goes this route (though it would not normally appear in the stack of applications that have effect on this issue).\r\n\r\nExcept for konsole where this issue may appear just because glyph is taken not from the current font I think you will see the issue if your Vim version thinks that glyph representing codepoint is two screen cells wide, while terminal thinks that glyph is one screen cell wide.\r\n\r\nThough in any case I agree that @nicolas-ivanov has not provided any useful information, just point that providing just Vim version and the fact that you are using tmux would be just as useless if you were issue reporter.\r\n\r\nI would also suggest to check `:echo strdisplaywidth(\"\\U1F603\")` and check where terminal will wrap if printing character and lengthy string: e.g. with\r\n\r\n    perl -e \"use utf8; use Encode; print(Encode::encode_utf8(chr(0x1F608))); print('0123456789' x ($COLUMNS/10 + 1)); print(chr(0x0A) . $COLUMNS . chr(0x0A))\""}}
{"actor":{"display_login":"ZyX-I"}}