-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Vim cursor disappears after running crystal scripts in Vim subshell #3367
Comments
Cursor color commands not reset at end of crystal output? |
@chaniks Are you using vim-crystal? If so, this should probably be reported there (this repository is about the compiler and standard library). Thank you! |
@asterite Yes. But it is not vim-crystal dependent. (The machines that don't have vim-crystal installed also produce the same result.) |
Maybe related to #2713, though I'll have to know what these crystal executables you use do (do they replace the buffer or modify it?) |
@ozra I guess there is a little bit more. The (visible) position of the cursor also changes, and before returning back to Vim main screen, Vim waits for user to press This is what I've found while research: mitmproxy/mitmproxy#357 (comment) |
@asterite actually, now it does nothing at all. (I tried to narrow it down) $ touch a.cr
$ crystal build a.cr and By the way, what I was mostly worried about was that the compiler itself is also a crystal-compiled executable. Do you have to compile all from the first version again to fix this? |
@asterite Maybe the crystal stdlib shouldn't treat ttys differently until it needs to. I'm pretty sure crystal changes tty modes and settings in the stdlib by default, and I think that this should be explicit. |
@RX14 hmm.. I don't know about the history on this, but current way of handling tty sounds |
I guess I found the problem. The bug appears 0.7.2, which introduced It overwrites the blocking option of However, writing a fix for this issue may require some design considerations. I am too new to crystal to do that. Whoever can handle it, please go on. |
Mac OS X 10.11.6 / Crystal 0.19.2 and master
Reproduce:
:!crystal
and press EnterNow the cursor disappears.
Details:
When already editing some files in Vim (not always but sometimes, usually with syntax-enabled files), some lines become invisible. (e.g. mbox file?)
In some cases, the cursor shows up again if I move the cursor with keyboard, but sometimes it doesn't.
Running _crystal-compiled executables_ in Vim subshell produces the same problem.
Also tested with a fresh new account and on a different Mac machine (same OS version though), but the results were same.
Workaround
After running the script,
<CTRL+Z>
and thenfg
(return to parent shell and come back):
and press<Enter>
=> does not fix the vanished linesThe text was updated successfully, but these errors were encountered: