Permalink
Browse files

Don’t insert ending break anywhere but the actual end of the buffer. …

…Make sure it gets put on its own line & doesn’t overwrite anything.
  • Loading branch information...
1 parent 7236566 commit 3120e5227b60b76b4f225ebe66e527788610a1c9 @ieure committed Nov 20, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 test-case-mode.el
View
@@ -690,8 +690,14 @@ and `test-case-mode-line-info-position'."
(error "Test result buffer killed"))
(with-current-buffer out-buffer
- (insert-char ?= fill-column)
- (newline))
+ (save-excursion
+ (save-restriction
+ (goto-char (point-max))
+ (when (not (= (line-beginning-position) (line-end-position)))
+ (goto-char (line-end-position))
+ (newline))
+ (insert-char ?= fill-column)
+ (newline))))
(when (buffer-live-p test-buffer)
(test-case-set-buffer-state

0 comments on commit 3120e52

Please sign in to comment.