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

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

[elpa] externals/dtache b121de820c 2/2: Handle carriage motion when open


From: ELPA Syncer
Subject: [elpa] externals/dtache b121de820c 2/2: Handle carriage motion when opening a session
Date: Wed, 11 May 2022 16:57:27 -0400 (EDT)

branch: externals/dtache
commit b121de820cf28ed507194b9c4cde90ac9ca672d8
Author: Rose Osterheld <dev@roeli.org>
Commit: Niklas Eklund <niklas.eklund@posteo.net>

    Handle carriage motion when opening a session
    
    Properly handle characters like carriage returns and backspaces in session
    output. The package can now properly handle these characters upon
    viewing a session. For now it will handle the previous output when
    tailing a session but any new output will not be handled.
---
 dtache.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dtache.el b/dtache.el
index 03cf504a4d..2c1294fe2d 100644
--- a/dtache.el
+++ b/dtache.el
@@ -45,6 +45,7 @@
 
 (require 'ansi-color)
 (require 'autorevert)
+(require 'comint)
 (require 'notifications)
 (require 'filenotify)
 (require 'simple)
@@ -1302,6 +1303,8 @@ If event is cased by an update to the `dtache' database, 
re-initialize
 (define-derived-mode dtache-log-mode nil "Dtache Log"
   "Major mode for `dtache' logs."
   (when dtache-filter-ansi-sequences
+    (comint-carriage-motion (point-min) (point-max))
+    (set-buffer-modified-p nil)
     (ansi-color-apply-on-region (point-min) (point-max)))
   (read-only-mode t))
 
@@ -1323,6 +1326,8 @@ If event is cased by an update to the `dtache' database, 
re-initialize
   (setq-local auto-revert-verbose nil)
   (auto-revert-tail-mode)
   (when dtache-filter-ansi-sequences
+    (comint-carriage-motion (point-min) (point-max))
+    (set-buffer-modified-p nil)
     (add-hook 'after-revert-hook #'dtache--ansi-color-tail nil t)
     (ansi-color-apply-on-region (point-min) (point-max)))
   (read-only-mode t))



reply via email to

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