{"action":"created","issue":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/3074","repository_url":"https://api.github.com/repos/fish-shell/fish-shell","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/3074/labels{/name}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/3074/comments","events_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/3074/events","html_url":"https://github.com/fish-shell/fish-shell/issues/3074","id":156977034,"number":3074,"title":"commandline operations after returning from curses display in binding mishandle multi-line prompts ","user":{"login":"kopischke","id":80906,"avatar_url":"https://avatars.githubusercontent.com/u/80906?v=3","gravatar_id":"","url":"https://api.github.com/users/kopischke","html_url":"https://github.com/kopischke","followers_url":"https://api.github.com/users/kopischke/followers","following_url":"https://api.github.com/users/kopischke/following{/other_user}","gists_url":"https://api.github.com/users/kopischke/gists{/gist_id}","starred_url":"https://api.github.com/users/kopischke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kopischke/subscriptions","organizations_url":"https://api.github.com/users/kopischke/orgs","repos_url":"https://api.github.com/users/kopischke/repos","events_url":"https://api.github.com/users/kopischke/events{/privacy}","received_events_url":"https://api.github.com/users/kopischke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-26T12:55:03Z","updated_at":"2016-05-26T21:33:27Z","closed_at":null,"body":"<!--\r\nThanks for helping to make fish better!\r\n\r\nIf you are asking for help with fish, or you've found a bug:\r\n - Make sure it's not a known or solved issue, by searching https://github.com/fish-shell/fish-shell/issues\r\n - Fill in the following information carefully:\r\n\r\n-->\r\n\r\nWhen using a binding that ~~substitutes~~ manipulates the command line after returning from a curses display, Fish repeats all prompt lines but the first on screen.\r\n\r\n### Reproduction Steps:\r\n\r\n1. Install or configure a multi-line prompt like [pure.fish](https://github.com/brandon099/pure.fish)\r\n2. `function testit; man fish; commandline -r 'fish trawl ended'; end`\r\n3. `bind \\cx testit`\r\n4. press Control-x on a new, empty prompt → fish man page display\r\n5. press q\r\n\r\n### Expected behavior:\r\n\r\nCurrent prompt line is set to “fish trawl ended”\r\n\r\n### Observed behavior:\r\n\r\nLine “fish trawl ended” appears below the current, empty prompt, on a new prompt line, but minus one line break. Illustration (notice the missing new line above the spurious prompt):\r\n\r\n<img width=\"970\" alt=\"fish prompt\" src=\"https://cloud.githubusercontent.com/assets/80906/15575082/562765e8-2351-11e6-8ed8-353e5a27cca1.png\">\r\n\r\n### Additional information:\r\n\r\n- Single line prompts are handled correctly\r\n- Inserting into the prompt (`commandline -i`)~~works fine~~ exhibits the same behavior as replacing\r\n- Adding `command -f [force-]repaint` to the function does not change the observed behavior\r\n- ~~Workarounds like killing the line and appending instead of replacing the command line buffer are blocked by #3031~~\r\n\r\n---\r\n- Fish version: 2.3, Homebrew installed via `brew install fish --devel`\r\n- Operating system: OS X 10.11.4\r\n- Terminal or terminal emulator: Terminal.app"},"comment":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/comments/222001325","html_url":"https://github.com/fish-shell/fish-shell/issues/3074#issuecomment-222001325","issue_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/3074","id":222001325,"user":{"login":"kopischke","id":80906,"avatar_url":"https://avatars.githubusercontent.com/u/80906?v=3","gravatar_id":"","url":"https://api.github.com/users/kopischke","html_url":"https://github.com/kopischke","followers_url":"https://api.github.com/users/kopischke/followers","following_url":"https://api.github.com/users/kopischke/following{/other_user}","gists_url":"https://api.github.com/users/kopischke/gists{/gist_id}","starred_url":"https://api.github.com/users/kopischke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kopischke/subscriptions","organizations_url":"https://api.github.com/users/kopischke/orgs","repos_url":"https://api.github.com/users/kopischke/repos","events_url":"https://api.github.com/users/kopischke/events{/privacy}","received_events_url":"https://api.github.com/users/kopischke/received_events","type":"User","site_admin":false},"created_at":"2016-05-26T21:33:27Z","updated_at":"2016-05-26T21:33:27Z","body":"Issue persists after updating to OS X 10.11.5."}}
{"actor":{"display_login":"kopischke"}}