{"action":"created","issue":{"url":"https://api.github.com/repos/magit/magit/issues/2388","labels_url":"https://api.github.com/repos/magit/magit/issues/2388/labels{/name}","comments_url":"https://api.github.com/repos/magit/magit/issues/2388/comments","events_url":"https://api.github.com/repos/magit/magit/issues/2388/events","html_url":"https://github.com/magit/magit/issues/2388","id":116368138,"number":2388,"title":"Staging a hunk collapses the file","user":{"login":"brunoqc","id":24027,"avatar_url":"https://avatars.githubusercontent.com/u/24027?v=3","gravatar_id":"","url":"https://api.github.com/users/brunoqc","html_url":"https://github.com/brunoqc","followers_url":"https://api.github.com/users/brunoqc/followers","following_url":"https://api.github.com/users/brunoqc/following{/other_user}","gists_url":"https://api.github.com/users/brunoqc/gists{/gist_id}","starred_url":"https://api.github.com/users/brunoqc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunoqc/subscriptions","organizations_url":"https://api.github.com/users/brunoqc/orgs","repos_url":"https://api.github.com/users/brunoqc/repos","events_url":"https://api.github.com/users/brunoqc/events{/privacy}","received_events_url":"https://api.github.com/users/brunoqc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/magit/magit/labels/30%20support","name":"30 support","color":"5319e7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-11-11T16:16:54Z","updated_at":"2015-11-18T09:34:19Z","closed_at":"2015-11-18T09:34:19Z","body":"When I stage a chunk from a Go file, the diff view closes. I don't know if it only happens with Go files (it happens if I remove `go-mode`).\r\n\r\nI tested with a very small file and I didn't have the problem.\r\n\r\nbefore I press 's'\r\n![image](https://cloud.githubusercontent.com/assets/24027/11095448/ffaa4052-8862-11e5-94d1-e92eb1a4ad1b.png)\r\n\r\nafter I press 's'\r\n![image](https://cloud.githubusercontent.com/assets/24027/11095472/1c29a1f0-8863-11e5-9ca7-f05654ac25be.png)\r\n\r\ntest emacs config file\r\n```lisp\r\n(require 'package)\r\n(package-initialize)\r\n\r\n(require 'magit)\r\n(require 'go-mode)\r\n```\r\n\r\nMagit 20151109.1450, Git 2.6.2.windows.1, Emacs 24.5.1\r\nGNU Emacs 24.5.1 (x86_64-w64-mingw32) of 2015-05-16 on KAEL\r\nWindows 10 64-bit"},"comment":{"url":"https://api.github.com/repos/magit/magit/issues/comments/157656611","html_url":"https://github.com/magit/magit/issues/2388#issuecomment-157656611","issue_url":"https://api.github.com/repos/magit/magit/issues/2388","id":157656611,"user":{"login":"tarsius","id":25046,"avatar_url":"https://avatars.githubusercontent.com/u/25046?v=3","gravatar_id":"","url":"https://api.github.com/users/tarsius","html_url":"https://github.com/tarsius","followers_url":"https://api.github.com/users/tarsius/followers","following_url":"https://api.github.com/users/tarsius/following{/other_user}","gists_url":"https://api.github.com/users/tarsius/gists{/gist_id}","starred_url":"https://api.github.com/users/tarsius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarsius/subscriptions","organizations_url":"https://api.github.com/users/tarsius/orgs","repos_url":"https://api.github.com/users/tarsius/repos","events_url":"https://api.github.com/users/tarsius/events{/privacy}","received_events_url":"https://api.github.com/users/tarsius/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T09:34:19Z","updated_at":"2015-11-18T09:34:19Z","body":"Since the above screenshots shows that the very first file is collapsed and `magit-diff-expansion-threshold` defaults to one second, we know that doing the things that happen before that take more than one second. That's very long, because there's not much going on there. I would also expect that to be somewhat unusual, so I am not increasing the default threshold.\r\n\r\nThis variable is a hack anyway, and after I have released v2.4 I'll start working on performance. so I am closing this issue."}}