Hi Bram, Kazunobu Kuriyama and list,

Related on this thread.
https://groups.google.com/d/msg/vim_dev/2oLpiSiztwo/U_rSKcCQDgAJ

Above report is 100% reproduced even at 8.0.1290.


I found another reproducing procedure.

I configured following one.
$ ./configure --enable-gui=gnome2 --enable-fail-if-missing

Step to reproduce:
- Run gvim with term
  $ vim --clean -g +term
- After changing the height of the terminal window with the mouse, keep the 
drag for about 4 seconds.

Expected behavior:
- I can input terminal window.

Actual behavior:
- I can NOT input terminal window and I see flickering cursor.


Investigation result:
I found flickering and stucking mechanism.

- Normal window cursor blinking request to gui_mch_set_blinking() with arg. 
waittime:700, on:1700, off:700
- ui_mch_start_blink() is called by something trigger.
  (timeout_add() called and callback is blink_cb())
- Move current window to terminal window.
- Terminal window cursor blinking request to gui_mch_set_blinking() with arg. 
waittime:0, on:0, off:0
  (Global variable `blink_waittime`, `blink_ontime` and `blink_offtime` is 
changed to zero
!)
- Because it timed out, blink_cb() is called.
- blink_cb() is referenced to `blink_ontime` and `blink_offtime` (It's Zero!)
- Make stuck by blink_cb() in timeout_add(0, blink_cb, NULL).


I make a patch.  (Check in blink_cb() avoiding stucking)

This bug does not occur because GTK3 has workaround in gui_mch_set_blinking().
However, if this patch is included, it may be better to turn off that 
workaround.

Kazunobu Kuriyama (Mr.GTK3)>
Please tell us your opinion.

--
Best regards,
Hirohito Higashi (h_east)

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 83b98e1..74346ac 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -911,6 +911,8 @@ gui_mch_stop_blink(void)
     static timeout_cb_type
 blink_cb(gpointer data UNUSED)
 {
+    if (blink_ontime == 0 && blink_offtime == 0)
+	return FALSE;
     if (blink_state == BLINK_ON)
     {
 	gui_undraw_cursor();

Raspunde prin e-mail lui