Jordan Russell's patch to match the PuTTY cursor blink rate to the
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Wed, 11 Apr 2001 10:03:46 +0000 (10:03 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Wed, 11 Apr 2001 10:03:46 +0000 (10:03 +0000)
system-configured one.

git-svn-id: svn://svn.tartarus.org/sgt/putty@1036 cda61777-01e9-0310-a592-d414129be87e

terminal.c

index f064a93..9ef0c5c 100644 (file)
@@ -1858,8 +1858,8 @@ static void do_paint (Context ctx, int may_optimise){
  */
 
 void term_blink(int flg) {
-static long last_blink = 0;
-static long last_tblink = 0;
+    static long last_blink = 0;
+    static long last_tblink = 0;
     long now, blink_diff;
 
     now = GetTickCount();
@@ -1880,8 +1880,8 @@ static long last_tblink = 0;
 
     blink_diff = now-last_blink;
 
-    /* Make sure the cursor blinks no more than 2Hz */
-    if (blink_diff>=0 && blink_diff<450)
+    /* Make sure the cursor blinks no faster than GetCaretBlinkTime() */
+    if (blink_diff>=0 && blink_diff<(long)GetCaretBlinkTime())
        return;
  
     last_blink = now;