Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

popup-tip ignores margin when beginning of line,and popup is disrupted when end of line. #19

Open
uk-ar opened this issue Sep 23, 2012 · 0 comments
Assignees
Labels
Milestone

Comments

@uk-ar
Copy link
Contributor

uk-ar commented Sep 23, 2012

popup-tip ignore margin when beginning of line,and popup is disrupted when end of line.
Here is the test code.

(ert-deftest popup-test-margin-at-left ()
  (popup-test-with-temp-buffer
    (let ((popup (popup-tip "Margin?" :nowait t :margin t)))
      (with-current-buffer (popup-test-helper-get-overlays-buffer)
        (let ((points (popup-test-helper-match-points '(" Margin? "))))
          (should (every #'identity points))
          (should (equal (car (popup-test-helper-points-to-columns points))
                         0))
          )))))

(ert-deftest popup-test-margin-at-right ()
  (popup-test-with-temp-buffer
    (insert (make-string (- (window-width) 1) ? ))
    (let ((popup (popup-tip "Margin?" :nowait t :margin t)))
      (with-current-buffer (popup-test-helper-get-overlays-buffer)
        (let ((points (popup-test-helper-match-points '(" Margin? "))))
          (should (every #'identity points))
          (should (equal (car (popup-test-helper-points-to-columns points))
                         (- (window-width) 9)))
          )))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants