diff options
Diffstat (limited to 'lisp/term/xterm.el')
-rw-r--r-- | lisp/term/xterm.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 0973329fa3a..c4b0a8fb6e6 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el @@ -767,13 +767,15 @@ Can be nil to mean \"no timeout\".") By not redisplaying right away for xterm queries, we can avoid unsightly flashing during initialization. Give up and redisplay anyway if we've been waiting a little while." - (let ((start-time (float-time))) + (let ((start-time (current-time))) (or (let ((inhibit-redisplay t)) (read-event nil nil xterm-query-redisplay-timeout)) (read-event nil nil (and xterm-query-timeout - (max 0 (+ start-time xterm-query-timeout - (- (float-time))))))))) + (max 0 (float-time + (time-subtract + xterm-query-timeout + (time-since start-time))))))))) (defun xterm--query (query handlers &optional no-async) "Send QUERY string to the terminal and watch for a response. |