New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for prompts containing newlines. #1105
Conversation
Works for me. |
Great, thanks. I'll give the others a day or two to make any comments, then merge it. |
works fine for me, thanks. |
Glad to hear the fixes work correctly. I thought for a bit about what kind of automated test we could add to ensure this doesn't return to bite us later, but I can't quite seem to see a quick way to make one. I figured we could do one involving creating an irunner with custom prompts, running a session through it and validating back the output, but it sounds like a fair amount of hassle and I'm not sure the effort/payoff is worth it. If you can think of a way to test this that isn't too painful to implement, go ahead and do it, otherwise merge as-is. |
I think we could do a bit of unit testing with the .width attribute, |
Sure :) We've made good progress on the other PRs today, so we can sit on this one for a few days before the 0.12 rc. |
I've added a few simple tests, and checked that they're passing. |
nice, looks good to me. |
Great. I'll merge it later today unless anyone objects. |
please do, thanks! |
Rebased to avoid a merge, and pushed. |
@rkern, I've tried this with the config example you supplied, and it seems to be working OK.
Specifically, we now only justify prompts based on the last line of the preceding prompt, and we don't attempt to justify multiline prompts at all.
Closes gh-1104