-
Notifications
You must be signed in to change notification settings - Fork 304
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 crash and rendering where large content is pasted to console on non-Windows #691
Conversation
I think the changes are fine, I'll try them out for a bit before merging. Are you also going to fix |
@lzybkr that's a separate issue (able to repro with a large directory listing with my changes). I'll look at it in between other work as a separate PR. |
I'm on the fence with this fix. I'm not sure Rendering is also still broken if you scroll up, e.g. press I think I've known about this general problem for so long that I'd forgotten about it, so it seems to come up rarely. Is it now more important in some scenario I wasn't aware of? If not, I might be OK with the exception until the scenario is fixed completely. Of course at that point, we almost have a real text editor. |
@lzybkr it comes up easily on non-Windows when pasting a large script |
It happens easily on Windows as well, but you need a small window. For my education and to better understand an appropriate fix - when are small console windows normally hit on non-Windows? I know that with no gui the window is small, but where else? |
The default terminal size on Ubuntu is 80x24. |
Maybe it's reasonable to disallow a command line that exceeds the buffer height, at least until you can actually edit it properly. |
@lzybkr I think we should take this fix as even if you can't edit the buffer, it does show the syntax highlighting correctly making it easier to read. If you think we should explicitly disallow editing, I think we should have that as a separate issue. This PR does fix the current issue of an unhandled exception. |
I'm still on the fence about allowing |
There aren't too many references to |
If we decide a negative |
It would be good to add a test as well. The current console proxy does use a fixed buffer, but it might need some improvements to handle this scenario. |
…than console and also causes the screen buffer to scroll
6b3b7fc
to
4aebcdd
Compare
#979 has been merged as a more general fix to the |
Several issues:
Fix #663