Browse Source

Fixes #2860. Application views do not refresh when the cursor is moved with CursesDriver.

BDisp 1 year ago
parent
commit
c90366a03d
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Terminal.Gui/ConsoleDrivers/CursesDriver/UnixMainLoop.cs

+ 4 - 0
Terminal.Gui/ConsoleDrivers/CursesDriver/UnixMainLoop.cs

@@ -175,6 +175,10 @@ namespace Terminal.Gui {
 			if (mainLoop.timeouts.Count > 0) {
 				pollTimeout = (int)((mainLoop.timeouts.Keys [0] - now) / TimeSpan.TicksPerMillisecond);
 				if (pollTimeout < 0) {
+					// This avoids poll waiting infinitely if pollTimeout=-1 until some action is detected
+					if (pollTimeout == -1) {
+						pollTimeout = 0;
+					}
 					return true;
 				}
 			} else