{"action":"created","issue":{"url":"https://api.github.com/repos/rstudio/rstudio/issues/2460","repository_url":"https://api.github.com/repos/rstudio/rstudio","labels_url":"https://api.github.com/repos/rstudio/rstudio/issues/2460/labels{/name}","comments_url":"https://api.github.com/repos/rstudio/rstudio/issues/2460/comments","events_url":"https://api.github.com/repos/rstudio/rstudio/issues/2460/events","html_url":"https://github.com/rstudio/rstudio/issues/2460","id":307066150,"number":2460,"title":"Stage chunk and stage line exclude last line of file","user":{"login":"dapperjapper","id":246279,"avatar_url":"https://avatars1.githubusercontent.com/u/246279?v=4","gravatar_id":"","url":"https://api.github.com/users/dapperjapper","html_url":"https://github.com/dapperjapper","followers_url":"https://api.github.com/users/dapperjapper/followers","following_url":"https://api.github.com/users/dapperjapper/following{/other_user}","gists_url":"https://api.github.com/users/dapperjapper/gists{/gist_id}","starred_url":"https://api.github.com/users/dapperjapper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dapperjapper/subscriptions","organizations_url":"https://api.github.com/users/dapperjapper/orgs","repos_url":"https://api.github.com/users/dapperjapper/repos","events_url":"https://api.github.com/users/dapperjapper/events{/privacy}","received_events_url":"https://api.github.com/users/dapperjapper/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-20T22:47:16Z","updated_at":"2018-03-21T20:19:13Z","closed_at":null,"author_association":"NONE","body":"<!-- This issue tracker is for bugs and feature requests in the RStudio IDE. If you're having trouble with R itself or an R package, see https://www.r-project.org/help.html, and if you want to ask a question rather than report a bug, go to https://community.rstudio.com/. Finally, if you use RStudio Server Pro, get in touch with our Pro support team at support@rstudio.com.\r\n\r\nIf you're here to report a bug in RStudio, please take the time to fill out as much of the below as you're able so that we can reproduce the problem you're seeing.  -->\r\n\r\n### System details\r\n\r\nI was able to reproduce this bug on both systems that I had access to.\r\n\r\n    RStudio Edition : Server and Deskop\r\n    RStudio Version : 1.1.383 (Server) and 0.98.1103 (Desktop)\r\n    OS Version      : \r\n    R Version       : R version 3.4.2 (Both)\r\n\r\n### Steps to reproduce the problem\r\n\r\n1. Create a file in a git-tracked repo in RStudio. Add a line of text and a newline at the end and commit.\r\n2. Add at least two lines of text to the file--keeping the newline at the end--and save.\r\n3. Highlight the last two or three lines of the file in the RStudio git diff viewer, and click \"Stage lines.\"\r\n4. The lines above the last line will be staged, but the last line of the file is mysteriously unstaged.\r\n\r\n### Describe the problem in detail\r\n\r\nThe \"Stage line\" and \"Stage chunk\" buttons in the diff viewer window don't apply any operations to the last line of a file when editing a file that has a newline at the end. The \"Stage\" button (that applies to the whole file) functions correctly, just not the partial staging buttons in the lower pane.\r\n\r\nI'm guessing there's an off-by-one bug somewhere in the code that connects to the git backend.\r\n\r\n### Describe the behavior you expected\r\n\r\nAny lines that are highlighted when \"Stage lines\" is clicked should be staged."},"comment":{"url":"https://api.github.com/repos/rstudio/rstudio/issues/comments/375081966","html_url":"https://github.com/rstudio/rstudio/issues/2460#issuecomment-375081966","issue_url":"https://api.github.com/repos/rstudio/rstudio/issues/2460","id":375081966,"user":{"login":"kevinushey","id":1976582,"avatar_url":"https://avatars1.githubusercontent.com/u/1976582?v=4","gravatar_id":"","url":"https://api.github.com/users/kevinushey","html_url":"https://github.com/kevinushey","followers_url":"https://api.github.com/users/kevinushey/followers","following_url":"https://api.github.com/users/kevinushey/following{/other_user}","gists_url":"https://api.github.com/users/kevinushey/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinushey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinushey/subscriptions","organizations_url":"https://api.github.com/users/kevinushey/orgs","repos_url":"https://api.github.com/users/kevinushey/repos","events_url":"https://api.github.com/users/kevinushey/events{/privacy}","received_events_url":"https://api.github.com/users/kevinushey/received_events","type":"User","site_admin":false},"created_at":"2018-03-21T20:19:13Z","updated_at":"2018-03-21T20:19:13Z","author_association":"CONTRIBUTOR","body":"Thanks for the bug report! We've bumped into this numerous times in the past as well and it's definitely a vexing bug -- unfortunately, we haven't been able to get to the bottom of it yet, but we'll continue investigating."}}
{"actor":{"display_login":"kevinushey"}}