Переглянути джерело

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

BDisp 1 рік тому
батько
коміт
925816e6ae

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

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