aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Erik Martin-Dorel <erik@martin-dorel.org>2018-08-25 18:27:09 +0200
committerGravatar GitHub <noreply@github.com>2018-08-25 18:27:09 +0200
commit69066bf2cb97d6df74a069c3e90155e43353a2a0 (patch)
treec9ffccbd8bb3ff4d16f6634c3c438990b96ce23d
parent95786256fc32ad6881b4d95d98b5b41acd171fc9 (diff)
parent7b10643f60e4db501a40f1cf84f42810320121be (diff)
Merge pull request #169 from ProofGeneral/help-span-extended
Fix #158 by extending helpspan
-rw-r--r--generic/proof-script.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/generic/proof-script.el b/generic/proof-script.el
index 3a663a3a..c938dfad 100644
--- a/generic/proof-script.el
+++ b/generic/proof-script.el
@@ -733,15 +733,17 @@ In any case, a mouse highlight and tooltip are only set if
Argument FACE means add 'face property FACE to the span."
(let* ((output (pg-last-output-displayform))
- (newstart (save-excursion
+ (new-start (save-excursion
(goto-char (span-start span))
(skip-chars-forward " \n\t")
(point)))
- (newend (save-excursion
+ (new-end (save-excursion
(goto-char (span-end span))
(skip-chars-backward " \n\t")
(point)))
- (newspan (span-make-modifying-removing-span newstart newend)))
+ (extended-start (max (1- new-start) (point-min)))
+ (extended-end (min (1+ new-end) (point-max)))
+ (newspan (span-make-modifying-removing-span extended-start extended-end)))
(span-set-property span 'pg-helpspan newspan) ; link from parent