Fix terminal window issue related scrollback (fix: #16024)#16211
Fix terminal window issue related scrollback (fix: #16024)#16211h-east wants to merge 1 commit intovim:masterfrom
Conversation
|
Hmm, Is Test_termwinscroll_topline() flaky? |
|
I see it hangs sometimes: It seems diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index c037702ad..44ec848b5 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -6621,7 +6621,8 @@ gui_mch_draw_part_cursor(int w, int h, guicolor_T color)
void
gui_mch_update(void)
{
- while (g_main_context_pending(NULL) && !vim_is_input_buf_full())
+ int cnt = 0; // prevent endless loop
+ while (g_main_context_pending(NULL) && !vim_is_input_buf_full() && ++cnt < 100)
g_main_context_iteration(NULL, TRUE);
}Does that make sense? I hope. |
|
@chrisbra Thanks for digging into the CI error.
Lines 7035 to 7040 in 6e19993 |
|
Honestly, I don't know. I just wanted to make sure the loop is properly cancelled in case of both of the other conditions keep returning "TRUE". We may as well use the example code you showed, I just thought the counter would be a bit easier. |
|
Ok, let's go with your fix. |
abad8fa to
1bdf34e
Compare
Problem: tests: test_terminal2 may hang in GUI mode
Solution: break the loop in gui_mch_update() after at most 99 iterations
(h-east)
related: #16211
Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
Are you sure the issue is fixed? I'm using vim 9.1 with included patches 1-1043 and the reproduce instruction in #16024 still gives the error for me. (sanity check, this PR is patch 9.1.0930 which is included there right?) |
|
Perhaps, patch 9.1.0931 |
|
It might be a different error, but we would need more details |
|
I can reproduce it with the exact same instructions as in #16024 (comment) Video for demonstration: |
|
I couldn't reproduce the problem by writing a test using the exact steps, so I found a pattern where the error occurred in a different step and wrote a test and patch. However, it seems that this only fixed a different problem. |
Problem: terminal: E315 when dragging the terminal with the mouse
(user202729)
Solution: call update_topline() and validate_cursor() when clicking
on the status line with the mouse (Hirohito Higashi)
fixes: #16024
fixes: #16211
closes: #16552
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Fix: #16024
When switching the current window with mouse operations,
update_topline()is not called, resulting in multiple occurrences of E340 and E315.