* lisp/ffap.el (ffap-gopher-at-point): Stop when we get to the end
of the buffer.
* test/lisp/ffap-tests.el (ffap-test-no-newlines): Ensure
termination for corner case (bug#44048).
(point)))
(bookmark (cl-loop for keyval = (ffap--gopher-var-on-line)
while keyval collect keyval
- do (forward-line 1))))
+ do (forward-line 1)
+ until (eobp))))
(when bookmark
(setq ffap-string-at-point-region (list beg (point)))
(let-alist (nconc bookmark '((type . "1") (port . "70")))
t "C:\\temp\\program.log on Windows or /var/log/program.log on Unix.")
"\\temp\\program.log")))
+(ert-deftest ffap-test-no-newlines ()
+ (should-not
+ (with-temp-buffer
+ (save-excursion (insert "type="))
+ (ffap-guess-file-name-at-point))))
+
(provide 'ffap-tests)
;;; ffap-tests.el ends here