summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-05-24 20:18:10 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-05-24 20:18:10 +0200
commitce75f3662895726cdea87427a4a9d5ec6365cee8 (patch)
tree490638ab6deafe322c0789798a94053a3a7172d1
parent581b1691b18f7a9209ee350d3af5e1f4366cc84d (diff)
downloadgeiser-ce75f3662895726cdea87427a4a9d5ec6365cee8.tar.gz
geiser-ce75f3662895726cdea87427a4a9d5ec6365cee8.tar.bz2
Bug fix: delete results buffers only when a new request is available.
-rw-r--r--elisp/geiser-connection.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/elisp/geiser-connection.el b/elisp/geiser-connection.el
index 8e31eaa..702f3b6 100644
--- a/elisp/geiser-connection.el
+++ b/elisp/geiser-connection.el
@@ -171,12 +171,11 @@
(let* ((buffer (geiser-con--connection-buffer con))
(req (geiser-con--connection-pop-request con))
(str (and req (geiser-con--request-string req)))
- (cbuf (with-current-buffer (geiser-con--comint-buffer)
- (erase-buffer)
- (current-buffer))))
+ (cbuf (geiser-con--comint-buffer)))
(if (not (buffer-live-p buffer))
(geiser-con--connection-cancel-timer con)
(when (and buffer req str)
+ (with-current-buffer cbuf (delete-region (point-min) (point-max)))
(set-buffer buffer)
(geiser-log--info "<%s>: %s" (geiser-con--request-id req) str)
(comint-redirect-send-command (format "%s" str) cbuf nil t))))))