branch: externals/coterm
commit 5181afcef207116a7a527e08ba0555a070b7a69f
Author: Miha Rihtaršič <[email protected]>
Commit: Miha Rihtaršič <[email protected]>

    Don't narrow before saving point position
---
 coterm.el | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/coterm.el b/coterm.el
index 271145c079..1b8d4168d6 100644
--- a/coterm.el
+++ b/coterm.el
@@ -983,11 +983,11 @@ terminal screen."
             (setq string (concat fragment string))
             (setq coterm--t-unhandled-fragment nil))
 
+          (setq restore-point (if (= (point) pmark) pmark (point-marker)))
+          (setq old-pmark (copy-marker pmark window-point-insertion-type))
+
           (save-restriction
             (coterm--narrow-to-process-output pmark)
-
-            (setq restore-point (if (= (point) pmark) pmark (point-marker)))
-            (setq old-pmark (copy-marker pmark window-point-insertion-type))
             (goto-char pmark)
             ;; (setq coterm--t-row nil)
             (setq coterm--t-col nil)
@@ -1303,8 +1303,7 @@ terminal screen."
             (set-marker pmark (point))
             (skip-chars-forward " \n")
             (when (eobp)
-              (delete-region pmark (point)))
-            (widen))
+              (delete-region pmark (point))))
 
           ;; Restore point (this restores it only for the selected window)
           (goto-char restore-point)

Reply via email to