emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/coterm 710e7d3087 1/2: Fix cursor restoration escape co


From: ELPA Syncer
Subject: [elpa] externals/coterm 710e7d3087 1/2: Fix cursor restoration escape code
Date: Mon, 27 Dec 2021 16:57:22 -0500 (EST)

branch: externals/coterm
commit 710e7d3087cc21cebeacf7168b6043d4930cf019
Author: Miha Rihtaršič <miha@kamnitnik.top>
Commit: Miha Rihtaršič <miha@kamnitnik.top>

    Fix cursor restoration escape code
---
 coterm.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/coterm.el b/coterm.el
index 5806f3c616..ad06ce5c69 100644
--- a/coterm.el
+++ b/coterm.el
@@ -1025,9 +1025,10 @@ buffer and the scrolling region must cover the whole 
screen."
                                    ansi-color-context)))
                    (?8 (ins) ;; Restore cursor (terminfo: rc)
                        (when-let ((cursor coterm--t-saved-cursor))
-                         (setq coterm--t-row (max (car cursor) (1- 
coterm--t-height)))
+                         (setq coterm--t-saved-cursor nil)
+                         (setq coterm--t-row (min (car cursor) (1- 
coterm--t-height)))
                          (setq cursor (cdr cursor))
-                         (setq coterm--t-col (max (car cursor) (1- 
coterm--t-width)))
+                         (setq coterm--t-col (min (car cursor) (1- 
coterm--t-width)))
                          (setq cursor (cdr cursor))
                          (setq ansi-color-context-region (car cursor))
                          (setq ansi-color-context (cadr cursor))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]