From 57f3a6110d7386cb71b01b8251aa7d3b11be5b8e Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 5 May 2017 19:38:34 -0400 Subject: transport-next-link: Fix error on whitespace When point is on whitespace, there are no description bounds because there is no text to use for the description. Avoid a type error in this case by navigating to the initial location of point rather than the left description bound. --- test-org-link-edit.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test-org-link-edit.el') diff --git a/test-org-link-edit.el b/test-org-link-edit.el index 9f8a3bd..a5fecef 100644 --- a/test-org-link-edit.el +++ b/test-org-link-edit.el @@ -545,6 +545,13 @@ website" (org-link-edit-transport-next-link 'previous (point) (point-max)) (buffer-string)))) + ;; Transport next link with point on whitespace. + (should + (string= "Here is\[\[http://orgmode.org/\]\] Org's website " + (org-test-with-temp-text + "Here is Org's website http://orgmode.org/" + (org-link-edit-transport-next-link) + (buffer-string)))) ;; Fail if point is on a link. (should-error (org-test-with-temp-text -- cgit v1.2.3