From 20a4f6a967dc864b1fb5428a3f358246f5ab67f8 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 25 Aug 2014 12:40:53 -0400 Subject: [PATCH] * emulation/cua-rect.el (cua--highlight-rectangle): Avoid error at point-min. Fixes: debbugs:18309 --- lisp/ChangeLog | 5 +++++ lisp/emulation/cua-rect.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 53707b23670..3a53d8f9ce5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-08-25 Glenn Morris + + * emulation/cua-rect.el (cua--highlight-rectangle): + Avoid error at point-min. (Bug#18309) + 2014-08-18 Stefan Monnier * progmodes/python.el (python-shell-prompt-detect): Remove redundant diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el index 31dd137a6b9..4620b0e8c0f 100644 --- a/lisp/emulation/cua-rect.el +++ b/lisp/emulation/cua-rect.el @@ -794,7 +794,7 @@ If command is repeated at same position, delete the rectangle." (make-string (- l cl0 (if (and (= le pl) (/= le lb)) 1 0)) (if cua--virtual-edges-debug ?. ?\s)) - 'face (or (get-text-property (1- s) 'face) 'default))) + 'face (or (get-text-property (max (1- s) (point-min)) 'face) 'default))) (if (/= pl le) (setq s (1- s)))) (cond -- 2.39.5