{"action":"created","issue":{"url":"https://api.github.com/repos/neovim/neovim/issues/4421","repository_url":"https://api.github.com/repos/neovim/neovim","labels_url":"https://api.github.com/repos/neovim/neovim/issues/4421/labels{/name}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/4421/comments","events_url":"https://api.github.com/repos/neovim/neovim/issues/4421/events","html_url":"https://github.com/neovim/neovim/issues/4421","id":138841870,"number":4421,"title":"spaces added to end of terminal pasted lines when using highlight ctermbg","user":{"login":"lqueryvg","id":5748327,"avatar_url":"https://avatars.githubusercontent.com/u/5748327?v=3","gravatar_id":"","url":"https://api.github.com/users/lqueryvg","html_url":"https://github.com/lqueryvg","followers_url":"https://api.github.com/users/lqueryvg/followers","following_url":"https://api.github.com/users/lqueryvg/following{/other_user}","gists_url":"https://api.github.com/users/lqueryvg/gists{/gist_id}","starred_url":"https://api.github.com/users/lqueryvg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lqueryvg/subscriptions","organizations_url":"https://api.github.com/users/lqueryvg/orgs","repos_url":"https://api.github.com/users/lqueryvg/repos","events_url":"https://api.github.com/users/lqueryvg/events{/privacy}","received_events_url":"https://api.github.com/users/lqueryvg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-03-06T21:44:22Z","updated_at":"2016-03-07T20:19:52Z","closed_at":null,"body":"- Neovim version: 0.1.2\r\n- Operating system: CentOS Linux release 7.2.1511 (Core) \r\n- Terminal emulator: xterm or urxvt256c with TERM=xterm-256color\r\n\r\n### Actual behaviour\r\nNeovim adds spaces to the end of lines pasted from the terminal (with `Shift` and middle mouse button).\r\n\r\n### Expected behaviour\r\nNo  extra spaces.\r\n\r\n### Steps to reproduce\r\n- Start nvim.\r\n- Add (`a`) the the following lines of text into the empty buffer.\r\n\r\n```\r\nthis is a line of text\r\nthis is a line of text\r\nthis is a line of text\r\n```                                                               \r\n\r\n- Apply the following highlight setting:\r\n\r\n`:highlight Normal ctermbg=232\r\n`\r\n\r\n- Go into insert mode at end of file (`Go`)\r\n- Hold down `Shift` and select the previously inserted lines of text with the left mouse button.\r\n- Paste the selected lines of text into the end of the buffer using `Shift` & middle-mouse button.\r\n- `Esc` to go back to command mode & navigate up (`k`) to the lines just pasted and use `$` to go to the end of each line.\r\n- Observe that spaces have been added to the end of each pasted line, up to the width of the window.\r\n\r\nNote: this doesn't happen with vim.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/neovim/neovim/issues/comments/193432563","html_url":"https://github.com/neovim/neovim/issues/4421#issuecomment-193432563","issue_url":"https://api.github.com/repos/neovim/neovim/issues/4421","id":193432563,"user":{"login":"lqueryvg","id":5748327,"avatar_url":"https://avatars.githubusercontent.com/u/5748327?v=3","gravatar_id":"","url":"https://api.github.com/users/lqueryvg","html_url":"https://github.com/lqueryvg","followers_url":"https://api.github.com/users/lqueryvg/followers","following_url":"https://api.github.com/users/lqueryvg/following{/other_user}","gists_url":"https://api.github.com/users/lqueryvg/gists{/gist_id}","starred_url":"https://api.github.com/users/lqueryvg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lqueryvg/subscriptions","organizations_url":"https://api.github.com/users/lqueryvg/orgs","repos_url":"https://api.github.com/users/lqueryvg/repos","events_url":"https://api.github.com/users/lqueryvg/events{/privacy}","received_events_url":"https://api.github.com/users/lqueryvg/received_events","type":"User","site_admin":false},"created_at":"2016-03-07T20:19:52Z","updated_at":"2016-03-07T20:19:52Z","body":"I should point out that although this issue might seem obscure, I suspect a lot of people might be affected for the following reasons:\r\n\r\n1. The `Normal ctermbg` setting can be found in many colour themes, for example I came across this problem when using https://github.com/nanotech/jellybeans.vim and I can see the setting in many of the themes supplied with the neovim package.\r\n2. As a unix sysadmin working on multiple remote machines, I commonly need to copy-paste between  different windows running unconnected vim sessions, i.e. via the terminal emulator's selection buffer / clipboard.\r\n\r\nI'm afraid that having spaces added to the selected / copied text in this way would make neovim unworkable as a replacement for vim in such situations."}}