emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/topspace 7212517c9b 145/181: Increase test coverage


From: ELPA Syncer
Subject: [elpa] externals/topspace 7212517c9b 145/181: Increase test coverage
Date: Tue, 23 Aug 2022 12:58:45 -0400 (EDT)

branch: externals/topspace
commit 7212517c9b02b13844d34e5ec1297dd718fc13be
Author: Trevor Pogue <poguete@mcmaster.ca>
Commit: Trevor Pogue <poguete@mcmaster.ca>

    Increase test coverage
---
 README.md   |  2 +-
 topspace.el | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index f260bc4bc4..9aa088a682 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
 
 <p align="center">
    <a 
href="https://github.com/trevorpogue/topspace/actions/workflows/test.yml/";><img 
src="https://github.com/trevorpogue/topspace/actions/workflows/test.yml/badge.svg";
 height="20"/></a>
-  <a href='https://coveralls.io/github/trevorpogue/topspace?branch=main'><img 
src='https://coveralls.io/repos/github/trevorpogue/topspace/badge.svg?branch=main?'
 alt='Coverage Status' /></a>
+  <a href='https://coveralls.io/github/trevorpogue/topspace?branch=main'><img 
src='https://coveralls.io/repos/github/trevorpogue/topspace/badge.svg?branch=main&;'
 alt='Coverage Status' /></a>
   <a href="http://melpa.org/#/topspace";><img 
src="http://melpa.org/packages/topspace-badge.svg"; height="20"/></a>
   <a href="http://stable.melpa.org/#/topspace";><img 
src="http://stable.melpa.org/packages/topspace-badge.svg"; height="20"/></a>
 </p>
diff --git a/topspace.el b/topspace.el
index 1e010febd5..fb7995e681 100644
--- a/topspace.el
+++ b/topspace.el
@@ -373,7 +373,7 @@ which must be accounted for in the calling functions."
         (setq result (+ result (* (vertical-motion 1) (line-pixel-height))))))
     result))
 
-(defun topspace--cnt-ln-slow (start end)
+(defun topspace--count-slow (start end)
   "Return screen lines between points START and END.
 Like `topspace--count-lines' but is a slower backup alternative."
   (/ (topspace--count-pixel-height start end) (float (default-line-height))))
@@ -384,7 +384,7 @@ Like `count-screen-lines' except `count-screen-lines' will
 return unexpected value when END is in column 0. This fixes that issue.
 This function also tries to first count the lines using a potentially faster
 technique involving `window-absolute-pixel-position'.
-If that doesn't work it uses `topspace--cnt-ln-slow'."
+If that doesn't work it uses `topspace--count-slow'."
   (let ((old-end end) (old-start start))
     (setq end (min end (- (window-end) 1)))
     (setq start (max start (window-start)))
@@ -395,11 +395,11 @@ If that doesn't work it uses `topspace--cnt-ln-slow'."
         ;; first try counting lines by getting the pixel difference
         ;; between end and start and dividing by `default-line-height'
         (+ (/ (- (cdr end-y) (cdr start-y)) (float (default-line-height)))
-           (if (> old-end end) (topspace--cnt-ln-slow end old-end) 0)
-           (if (< old-start start) (topspace--cnt-ln-slow old-start start) 0)))
+           (if (> old-end end) (topspace--count-slow end old-end) 0)
+           (if (< old-start start) (topspace--count-slow old-start start) 0)))
        (t ;; if the pixel method above doesn't work do this slower method
         ;; (it won't work if either START or END are not visible in window)
-        (topspace--cnt-ln-slow start old-end))))))
+        (topspace--count-slow start old-end))))))
 
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; Overlay drawing



reply via email to

[Prev in Thread] Current Thread [Next in Thread]