{"action":"created","issue":{"url":"https://api.github.com/repos/vrapper/vrapper/issues/726","repository_url":"https://api.github.com/repos/vrapper/vrapper","labels_url":"https://api.github.com/repos/vrapper/vrapper/issues/726/labels{/name}","comments_url":"https://api.github.com/repos/vrapper/vrapper/issues/726/comments","events_url":"https://api.github.com/repos/vrapper/vrapper/issues/726/events","html_url":"https://github.com/vrapper/vrapper/issues/726","id":136263160,"number":726,"title":"Surrounding a visual selection with a tag doesn't surround the selection","user":{"login":"jccyr01","id":37039,"avatar_url":"https://avatars.githubusercontent.com/u/37039?v=3","gravatar_id":"","url":"https://api.github.com/users/jccyr01","html_url":"https://github.com/jccyr01","followers_url":"https://api.github.com/users/jccyr01/followers","following_url":"https://api.github.com/users/jccyr01/following{/other_user}","gists_url":"https://api.github.com/users/jccyr01/gists{/gist_id}","starred_url":"https://api.github.com/users/jccyr01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jccyr01/subscriptions","organizations_url":"https://api.github.com/users/jccyr01/orgs","repos_url":"https://api.github.com/users/jccyr01/repos","events_url":"https://api.github.com/users/jccyr01/events{/privacy}","received_events_url":"https://api.github.com/users/jccyr01/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/vrapper/vrapper/labels/Defect","name":"Defect","color":"e10c02"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-25T03:09:01Z","updated_at":"2016-02-26T06:24:08Z","closed_at":"2016-02-25T22:12:35Z","body":"Hi, \r\n\r\nWhen using the surround plugin, surrounding a visual selection with a tag, causes the start and end tags to be inserted before the selected text instead of surrounding it.\r\n\r\n```html\r\n<div>\r\n    example text\r\n</div>\r\n```\r\n\r\n1. Select the word \"text\".\r\n1. Type `Stspan<CR>`\r\n\r\nYou end up with:\r\n```html\r\n<div>\r\n   example <span></span>text\r\n</div>\r\n```\r\n\r\nI have been debugging the code and the selection is being cleared before the insertion of the tag, when you exit command mode (where you type in the tag).\r\n\r\nNote that surrounding with a tag works correctly when typing `ysiwtspan<CR>` and that surrounding with quotes or brackets works in visual mode."},"comment":{"url":"https://api.github.com/repos/vrapper/vrapper/issues/comments/189129304","html_url":"https://github.com/vrapper/vrapper/issues/726#issuecomment-189129304","issue_url":"https://api.github.com/repos/vrapper/vrapper/issues/726","id":189129304,"user":{"login":"keforbes","id":817509,"avatar_url":"https://avatars.githubusercontent.com/u/817509?v=3","gravatar_id":"","url":"https://api.github.com/users/keforbes","html_url":"https://github.com/keforbes","followers_url":"https://api.github.com/users/keforbes/followers","following_url":"https://api.github.com/users/keforbes/following{/other_user}","gists_url":"https://api.github.com/users/keforbes/gists{/gist_id}","starred_url":"https://api.github.com/users/keforbes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keforbes/subscriptions","organizations_url":"https://api.github.com/users/keforbes/orgs","repos_url":"https://api.github.com/users/keforbes/repos","events_url":"https://api.github.com/users/keforbes/events{/privacy}","received_events_url":"https://api.github.com/users/keforbes/received_events","type":"User","site_admin":false},"created_at":"2016-02-26T06:24:08Z","updated_at":"2016-02-26T06:24:08Z","body":"I've updated the unstable update site with a new build (0.65.20160225) which includes this fix.  Please give it a try and let us know if you have any other problems.  Thanks!"}}