-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
vim-patch:8.1.{569,571} #9338
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-patch:8.1.{569,571} #9338
Conversation
Thanks. But could you please also add those lua tests from the previous PR |
ac275c8
to
2cc07e1
Compare
2cc07e1
to
9649288
Compare
|
Those failures are most likely a result of unexpected defaults in the Vim tests. E.g. Vim doesn't show a statusbar by default, so that's where Should be OK to |
@janlazo The cause of #9338 (comment) seems to be that diff --git a/src/nvim/message.c b/src/nvim/message.c
index b4aa333a4..93c2675fd 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -2289,7 +2289,7 @@ static void t_puts(int *t_col, const char_u *t_s, const char_u *s, int attr)
// - no UI and not embedded
int msg_use_printf(void)
{
- return !embedded_mode && !ui_active();
+ return !embedded_mode && !headless_mode && !ui_active();
}
/// Print a message when there is no valid screen. |
I read |
@erw7 what do you mean by "changed to the screen and stderr"?
|
@justinmk It is to change it like the following patch. diff --git a/src/nvim/message.c b/src/nvim/message.c
index a83c9cf05..20d0807f4 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -1810,8 +1810,13 @@ void msg_puts_attr_len(const char *const str, const ptrdiff_t len, int attr)
// different, e.g. for Win32 console) or we just don't know where the
// cursor is.
if (msg_use_printf()) {
+ int saved_msg_col = msg_col;
msg_puts_printf(str, len);
- } else {
+ if (headless_mode) {
+ msg_col = saved_msg_col;
+ }
+ }
+ if (!msg_use_printf() || headless_mode) {
msg_puts_display((const char_u *)str, len, attr, false);
}
} |
Ah, I think I understand: in order to make We could try that... |
Problem: Execute() always resets display column to zero. (Sha Liu) Solution: Don't reset it to zero, restore the previous value. (closes vim/vim#3669) vim/vim@10ccaa1
Problem: Non-silent execute() resets display column to zero. Solution: Keep the display column as-is. vim/vim@446e7a3
closes neovim#6035 closes neovim#9250
Fix multiple <C-D> showing statusline on previous completion list
Otherwise vim will think that ml_append() needs to "enter" the buffer, which emits unexpected autocommands. ref vim-airline/vim-airline#1930
api/buffer: avoid spurios Buf[Win]Enter in nvim_buf_set_lines
In the case of the headless mode, screenchar() does not operate normally because it is not output to the internal screen. Change output to stderr and internal screen to fix it.
Nvim might call `msg_puts_attr_len` before the screen buffers are allocated.
Updated after #10109 . Hoping to merge after CI. |
closes #6035
vim-patch:8.1.0569: execute() always resets display column to zero
Problem: Execute() always resets display column to zero. (Sha Liu)
Solution: Don't reset it to zero, restore the previous value. (closes vim/vim#3669)
vim/vim@10ccaa1
vim-patch:8.1.0571: non-silent execute() resets display column to zero
Problem: Non-silent execute() resets display column to zero.
Solution: Keep the display column as-is.
vim/vim@446e7a3