branch: master
commit 181d24dee769f7619f9cab5667e21477be9ac4bc
Merge: ad8d826 bdbbc65
Author: rocky <[email protected]>
Commit: rocky <[email protected]>
Merge commit 'bdbbc65028af8deb55a4e474be43b5b99e6cc539'
---
packages/realgud/realgud/debugger/zshdb/core.el | 9 +++++++++
packages/realgud/realgud/debugger/zshdb/zshdb.el | 20 ++++++++++++++------
packages/realgud/test/test-zshdb.el | 4 +++-
3 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/packages/realgud/etc/.nosearch b/packages/realgud/etc/.nosearch
new file mode 100644
index 0000000..e69de29
diff --git a/packages/realgud/realgud/.nosearch
b/packages/realgud/realgud/.nosearch
new file mode 100644
index 0000000..e69de29
diff --git a/packages/realgud/realgud/debugger/zshdb/core.el
b/packages/realgud/realgud/debugger/zshdb/core.el
index e8c5a6e..20a7cbe 100644
--- a/packages/realgud/realgud/debugger/zshdb/core.el
+++ b/packages/realgud/realgud/debugger/zshdb/core.el
@@ -157,6 +157,15 @@ Note that path elements have been expanded via
`realgud:expand-file-name-if-exis
realgud:zshdb-minibuffer-history
"sh" "\\.\\(?:z\\)?sh$"))
+(defun realgud:zshdb-remove-ansi-schmutz()
+ "Remove ASCII escape sequences that node.js 'decorates' in
+prompts and interactive output with"
+ (add-to-list
+ 'comint-preoutput-filter-functions
+ (lambda (output)
+ (replace-regexp-in-string "\033\\[\\?[0-9]+[GKJhl]" "" output)))
+ )
+
(defun zshdb-reset ()
"Zshdb cleanup - remove debugger's internal buffers (frame,
breakpoints, etc.)."
diff --git a/packages/realgud/realgud/debugger/zshdb/zshdb.el
b/packages/realgud/realgud/debugger/zshdb/zshdb.el
index 2b07cc1..0812997 100644
--- a/packages/realgud/realgud/debugger/zshdb/zshdb.el
+++ b/packages/realgud/realgud/debugger/zshdb/zshdb.el
@@ -1,4 +1,4 @@
-;; Copyright (C) 2011, 2014-2015 Free Software Foundation, Inc
+;; Copyright (C) 2011, 2014-2016 Free Software Foundation, Inc
;; Author: Rocky Bernstein <[email protected]>
@@ -14,6 +14,7 @@
(require-relative-list '("../../common/run") "realgud:")
(require-relative-list '("core" "track-mode") "realgud:zshdb-")
+(declare-function realgud:zshdb-remove-ansi-schmutz 'realgud:zshdb-core)
(declare-function zshdb-track-mode (bool))
(declare-function zshdb-query-cmdline 'realgud:zshdb-core)
(declare-function zshdb-parse-cmd-args 'realgud:zshdb-core)
@@ -69,11 +70,18 @@ marginal icons is reset. See `loc-changes-clear-buffer' to
clear
fringe and marginal icons.
"
(interactive)
- (realgud:run-debugger realgud:zshdb-command-name 'zshdb-query-cmdline
- 'zshdb-parse-cmd-args
- 'realgud:zshdb-minibuffer-history
- opt-cmd-line no-reset)
- )
+ (let ((cmd-buf
+ (realgud:run-debugger realgud:zshdb-command-name 'zshdb-query-cmdline
+ 'zshdb-parse-cmd-args
+ 'realgud:zshdb-minibuffer-history
+ opt-cmd-line no-reset)))
+ (if cmd-buf
+ (with-current-buffer cmd-buf
+ ;; FIXME should allow customization whether to do or not
+ ;; and also only do if hook is not already there.
+ (realgud:zshdb-remove-ansi-schmutz)
+ )
+ )))
(defalias 'zshdb 'realgud:zshdb)
diff --git a/packages/realgud/test/.nosearch b/packages/realgud/test/.nosearch
new file mode 100644
index 0000000..e69de29
diff --git a/packages/realgud/test/test-zshdb.el
b/packages/realgud/test/test-zshdb.el
index 86eb5e5..a908777 100644
--- a/packages/realgud/test/test-zshdb.el
+++ b/packages/realgud/test/test-zshdb.el
@@ -35,7 +35,9 @@
(assert-equal expanded-name script-filename "file name check")
(assert-equal (list expanded-name "3" "5")
(cdr cmd-args) "command args listified")
- ))
+ )
+ (current-buffer)
+ )
(note "zshdb-parse-cmd-args")
(assert-equal (list nil '("zshdb")