branch: externals/valign
commit 9f62c59799b5f4748b04e44282fdf75050db21ed
Author: Yuan Fu <[email protected]>
Commit: Yuan Fu <[email protected]>
* valign.el (valign--pixel-width-from-to): Fix invisible text detection.
---
valign.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/valign.el b/valign.el
index ea8cd44..247facc 100644
--- a/valign.el
+++ b/valign.el
@@ -121,11 +121,11 @@ calculate images pixel width."
(progn
(setq width (+ width (car (image-size display t))))
(goto-char
- (next-single-property-change (point) 'display))))
+ (next-single-property-change (point) 'display nil to))))
;; 2) Invisible text.
- ((plist-get (text-properties-at (point)) 'invisible)
+ ((invisible-p (point))
(goto-char
- (next-single-property-change (point) 'invisible)))
+ (next-single-property-change (point) 'invisible nil to)))
;; 3) This is a normal character, add glyph width.
(t (setq width (+ width (valign--glyph-width-at-point)))
(goto-char (1+ (point))))))))