diff options
| author | Stefan Monnier | 2018-10-14 16:44:21 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2018-10-14 16:44:21 -0400 |
| commit | 8c68e4afa8eebb6f738fdce600a6815509ac50a3 (patch) | |
| tree | 36bfa55ae5bcf1f36a7c5754ca1a4729cace4c1d /test/src | |
| parent | f1ea2b9e6b63593f5919f60a68a9e19026756ac4 (diff) | |
| download | emacs-8c68e4afa8eebb6f738fdce600a6815509ac50a3.tar.gz emacs-8c68e4afa8eebb6f738fdce600a6815509ac50a3.zip | |
* src/buffer.c (Fmove_overlay): Don't call Fdelete_overlay
... because the data structure is not in a consistent state.
* test/src/buffer-tests.el (overlay-evaporation-after-killed-buffer):
New test.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/buffer-tests.el | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/src/buffer-tests.el b/test/src/buffer-tests.el index 0e4fd3655ae..609585f43ed 100644 --- a/test/src/buffer-tests.el +++ b/test/src/buffer-tests.el | |||
| @@ -79,4 +79,19 @@ with parameters from the *Messages* buffer modification." | |||
| 79 | (with-temp-buffer | 79 | (with-temp-buffer |
| 80 | (should (eq (buffer-base-buffer (current-buffer)) nil)))) | 80 | (should (eq (buffer-base-buffer (current-buffer)) nil)))) |
| 81 | 81 | ||
| 82 | (ert-deftest overlay-evaporation-after-killed-buffer () | ||
| 83 | (let* ((ols (with-temp-buffer | ||
| 84 | (insert "toto") | ||
| 85 | (list | ||
| 86 | (make-overlay (point-min) (point-max)) | ||
| 87 | (make-overlay (point-min) (point-max)) | ||
| 88 | (make-overlay (point-min) (point-max))))) | ||
| 89 | (ol (nth 1 ols))) | ||
| 90 | (overlay-put ol 'evaporate t) | ||
| 91 | ;; Evaporation within move-overlay of an overlay that was deleted because | ||
| 92 | ;; of a kill-buffer, triggered an assertion failure in unchain_both. | ||
| 93 | (with-temp-buffer | ||
| 94 | (insert "toto") | ||
| 95 | (move-overlay ol (point-min) (point-min))))) | ||
| 96 | |||
| 82 | ;;; buffer-tests.el ends here | 97 | ;;; buffer-tests.el ends here |