[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
- [elpa] externals/topspace 4724b926a4 134/181: Add continuous integration and coverage, (continued)
- [elpa] externals/topspace 4724b926a4 134/181: Add continuous integration and coverage, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace a4c5873fb4 125/181: Update Changelog, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace d376bca4c8 130/181: Internal refactoring, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace e6cc9081a2 128/181: Add `topspace-height` function for use by external packages (#15), ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 7a0d565b68 126/181: Set back changelog head to `Unreleased`, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace f79b07c982 129/181: Update Changelog, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 64bbce19a0 136/181: Add coverage badge to readme, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 0541624721 138/181: Update test.yml, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 0e4b28f3d5 142/181: Refresh cached coveralls badge image in readme, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 25020db16f 143/181: Update test.yml, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 7212517c9b 145/181: Increase test coverage,
ELPA Syncer <=
- [elpa] externals/topspace 3531e9f84c 147/181: Update cached coveralls badge in readme, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 3669113748 151/181: Update contributing files, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 897553afd9 155/181: Add `topspace-set-height`, enhance `topspace-center-position` (#19), ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 7e44e30c8a 158/181: Add back coveralls reporting functionality, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 851737dfe3 161/181: Prepare `topspace` for inclusion in GNU ELPA, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace accc2a1ad0 164/181: Update NEWS.md, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace a1719f296b 165/181: Force update of NEWS.md, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace fa2e5713d7 156/181: Update Changelog, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace e046ab3a50 157/181: Internal refactoring and performance optimizations, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 27301e8c5a 171/181: Update tests, ELPA Syncer, 2022/08/23