Partially fix Bug#16403.

* rect.el (rectangle-mark-mode): When the region is not active,
display a message saying that the mark as been set and that
rectangle mode is in use.
(rectangle--highlight-for-redisplay): Only put an overlay with a
visible vertical bar when (display-graphic-p) is non-nil.
This partially fixes Bug#16403.
This commit is contained in:
Bastien Guerry 2014-01-13 11:55:22 +01:00
parent 6a1f3c119c
commit d791cc3bc2
2 changed files with 14 additions and 4 deletions

View file

@ -1,3 +1,12 @@
2014-01-13 Bastien Guerry <bzg@gnu.org>
* rect.el (rectangle-mark-mode): When the region is not active,
display a message saying that the mark as been set and that
rectangle mode is in use.
(rectangle--highlight-for-redisplay): Only put an overlay with a
visible vertical bar when (display-graphic-p) is non-nil.
This partially fixes Bug#16403.
2014-01-13 Juri Linkov <juri@jurta.org>
* info.el (Info-find-file): Go to DIR before displaying the error

View file

@ -444,7 +444,8 @@ Activates the region if needed. Only lasts until the region is deactivated."
(lambda () (rectangle-mark-mode -1)))
(unless (region-active-p)
(push-mark)
(activate-mark))))
(activate-mark)
(message "Mark set (rectangle mode)"))))
(defun rectangle--extract-region (orig &optional delete)
(if (not rectangle-mark-mode)
@ -553,10 +554,10 @@ Activates the region if needed. Only lasts until the region is deactivated."
(overlay-put ol 'after-string str))))
((overlay-get ol 'after-string)
(overlay-put ol 'after-string nil)))
(when (= leftcol rightcol)
(when (and (= leftcol rightcol) (display-graphic-p))
;; Make zero-width rectangles visible!
(overlay-put ol 'after-string
(concat (propertize " "
(overlay-put ol 'after-string
(concat (propertize " "
'face '(region (:height 0.2)))
(overlay-get ol 'after-string))))
(push ol nrol)