{"action":"created","issue":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2400","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2400/labels{/name}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2400/comments","events_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2400/events","html_url":"https://github.com/fish-shell/fish-shell/issues/2400","id":106937397,"number":2400,"title":"Suggestions not shown when right prompt disappears and/or second line is reached","user":{"login":"janernsting","id":1137575,"avatar_url":"https://avatars.githubusercontent.com/u/1137575?v=3","gravatar_id":"","url":"https://api.github.com/users/janernsting","html_url":"https://github.com/janernsting","followers_url":"https://api.github.com/users/janernsting/followers","following_url":"https://api.github.com/users/janernsting/following{/other_user}","gists_url":"https://api.github.com/users/janernsting/gists{/gist_id}","starred_url":"https://api.github.com/users/janernsting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janernsting/subscriptions","organizations_url":"https://api.github.com/users/janernsting/orgs","repos_url":"https://api.github.com/users/janernsting/repos","events_url":"https://api.github.com/users/janernsting/events{/privacy}","received_events_url":"https://api.github.com/users/janernsting/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/4","html_url":"https://github.com/fish-shell/fish-shell/milestones/fish-future","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/4/labels","id":130257,"number":4,"title":"fish-future","description":"These are bugs that are not targeted for an upcoming release. After a release, we will reexamine these bugs and pull any in that we think are good targets.\r\n\r\nIf you can provide a fix for a bug in this milestone, we'll generally accept it for the next release even if the bug is not in the release.","creator":{"login":"ridiculousfish","id":920838,"avatar_url":"https://avatars.githubusercontent.com/u/920838?v=3","gravatar_id":"","url":"https://api.github.com/users/ridiculousfish","html_url":"https://github.com/ridiculousfish","followers_url":"https://api.github.com/users/ridiculousfish/followers","following_url":"https://api.github.com/users/ridiculousfish/following{/other_user}","gists_url":"https://api.github.com/users/ridiculousfish/gists{/gist_id}","starred_url":"https://api.github.com/users/ridiculousfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ridiculousfish/subscriptions","organizations_url":"https://api.github.com/users/ridiculousfish/orgs","repos_url":"https://api.github.com/users/ridiculousfish/repos","events_url":"https://api.github.com/users/ridiculousfish/events{/privacy}","received_events_url":"https://api.github.com/users/ridiculousfish/received_events","type":"User","site_admin":false},"open_issues":383,"closed_issues":105,"state":"open","created_at":"2012-06-11T02:25:13Z","updated_at":"2015-11-01T10:20:39Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-09-17T08:45:09Z","updated_at":"2015-11-03T06:28:31Z","closed_at":null,"body":"With overly long lines, suggestions are no longer shown when the right prompt disappears. However, I can still accept suggestions using `forward-word` and/or `accept-suggestion`. The same holds true for commands that span more than one line; suggestions are shown for the first line only.\r\n\r\nIn the example below, I use `forward-word` for the second command. Even though the suggestion is not shown, I can still accept it.\r\n\r\n![right_prompt_broken_completion](https://cloud.githubusercontent.com/assets/1137575/9928484/e680a7fe-5d26-11e5-9c6b-82d5ead1d5c2.gif)\r\n\r\nI was able to reproduce this issue with a vanilla fish (no customisations), too, and tested for the issue using fish 2.2.0 on Ubuntu 14.04."},"comment":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/comments/153257916","html_url":"https://github.com/fish-shell/fish-shell/issues/2400#issuecomment-153257916","issue_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2400","id":153257916,"user":{"login":"ridiculousfish","id":920838,"avatar_url":"https://avatars.githubusercontent.com/u/920838?v=3","gravatar_id":"","url":"https://api.github.com/users/ridiculousfish","html_url":"https://github.com/ridiculousfish","followers_url":"https://api.github.com/users/ridiculousfish/followers","following_url":"https://api.github.com/users/ridiculousfish/following{/other_user}","gists_url":"https://api.github.com/users/ridiculousfish/gists{/gist_id}","starred_url":"https://api.github.com/users/ridiculousfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ridiculousfish/subscriptions","organizations_url":"https://api.github.com/users/ridiculousfish/orgs","repos_url":"https://api.github.com/users/ridiculousfish/repos","events_url":"https://api.github.com/users/ridiculousfish/events{/privacy}","received_events_url":"https://api.github.com/users/ridiculousfish/received_events","type":"User","site_admin":false},"created_at":"2015-11-03T06:28:31Z","updated_at":"2015-11-03T06:28:31Z","body":"We don't show the suggestion even if removing the right prompt frees up enough space. This is because it feels really weird to take something away, only to put it back again after consuming *more* space. A hierarchy of stuff that gets removed is less surprising than some sort of knapsack best-fit algorithm."}}