-
-
Notifications
You must be signed in to change notification settings - Fork 684
Blocking echo messages on startup result in blank screen #1573
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
Comments
Let me take a look, but I think this is a bad interaction with the "Press Enter" mode in Vim and some recent resize changes in MacVim. Basically Vim's "Press Enter" mode is quite fragile in that if you resize the window, it will clear all the rendering instead of redrawing itself. This issue occurs when Vim is used in a terminal as well but MacVim may have triggered a resize event which caused this to happen. Have you noticed this issue before (e.g. in r181) the current pre-release build (r181.1)? It would be nice to know when you have noticed that. But as you noticed it's mostly a rendering / redraw issue in Vim and pressing enter will indeed fix the issue. |
As of now, I haven't tried any other versions. |
I tried using It might be the same issue with resizing, since after MacVim launches, manually using |
Also, running your command seems to trigger some serious warning. Did you look at the terminal output and look at what it's saying? You are wrapping "vimdiff" as `vimdiff` and that's going to run vimdiff due to how most shells work and make everything unhappy. It's not like most terminal emulators understands markdown. Also, is there a reason why you are using |
I think the issue here is multi-fold. You are using There are multiple things you could do here:
I do want to fix Vim's Press Enter prompt to be more safe to terminal resizing but I think there are other things you could do in the meantime. Btw, seems like the issue here is that jj defaults to vimdiff, but then you want it to warn when vimdiff is used as-is because it does not do folder diff? That seems like a mediocre default behavior to me, as defaults should work instead of throwing up an annoying error message. If vimdiff doesn't work at all, it should just not be allowed to launch with jj explaining why. If it works, then having this error message every time a user wants to use it is going to get old real fast. This "kind of works but I'll annoy the hell out of you" seems like half measures to me. Even if there are warning messages I think it's better to show them before Vim is launched to have a consistent way to do this. Once Vim is launched you should just let it do its thing and the user may have all sorts of weird configurations that you are not aware of that may interfere with your message injection. I don't use it though so it's up to you. |
This was just to make sure my config doesn't affect the reproduction. I also tried The actual config doesn't have that option, and I get all the same problems. If you want to play around with [merge-tools.gvimdiff]
program = "gvim"
# `-d` enables diff mode. `-f` makes vim run in foreground even if it starts a GUI.
# The other options make sure that only the output file can be modified.
merge-args = ["-f", "-d", "$output", "-M", "$left", "$base", "$right",
"-c", "wincmd J", "-c", "set modifiable", "-c", "set write",
"-c", "/<<<<<</+2"]
merge-tool-edits-conflict-markers = true
# Directory diffing is barely usable in vimdiff without additional plugins
edit-args = [
"-f", "-d", "$left", "$right", "-c", "echohl WarningMsg", "-c",
# Or echomsg
'echowin "Warning: using plain `vimdiff` as a diff editor is not recommended. See https://github.com/jj-vcs/jj/wiki/Vim for alternatives."',
"-c", "echohl None",
]
diff-invocation-mode="file-by-file"
diff-args = ["-f", "-d", "$left", "$right"] I haven't yet read your other thoughts (thank you!), but wanted to clarify this point quickly. |
Steps to reproduce
With the latest prerelease, I run the following command (from a draft default diff tool config similar to jj-vcs/jj#6205, sorry for extraneous quotes):
Update: I changed this line to remove irrelevant backticks. They mess up the result in
bash
orzsh
; I didn't notice because I usefish
.(It doesn't matter which two files you'd be comparing, or if they even exist)
This results in a confusing blank screen instead of the expected message:
After pressing Enter, everything works.
Expected behaviour
In plain vim, I get:
Then, vim loads after I press ENTER.
Version of Vim and architecture
1-1251
Environment
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Mar 28 2025 09:26:05)
macOS version - arm64
Included patches: 1-1251
Compiled by GitHub Actions
How MacVim was installed
Downloaded from GitHub
Logs and stack traces
Vim configuration where issue is reproducable
No response
Issue has been tested with given configuration
Issue has been tested with no configuration
mvim --clean
(orgvim
, supplied by MacVim distribution)vim --clean
(in terminal, supplied by MacVim distribution)vim --clean
(in terminal, other suppliers, e.g. /usr/bin/vim)Other conditions
The text was updated successfully, but these errors were encountered: