[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/topspace 6692cd1346 169/181: Performance optimization
From: |
ELPA Syncer |
Subject: |
[elpa] externals/topspace 6692cd1346 169/181: Performance optimization |
Date: |
Tue, 23 Aug 2022 12:58:48 -0400 (EDT) |
branch: externals/topspace
commit 6692cd1346ce0b0a1fbdcbfa496b49365bcd660b
Author: Trevor Pogue <poguete@mcmaster.ca>
Commit: Trevor Pogue <poguete@mcmaster.ca>
Performance optimization
- Add extra condition in `topspace--post-command` before executing
`beginning-of-visual-line`, which can be time consuming
- Update comment in `topspace--text` to reflect the fact that
it is likely intentional that `line-height` cannot be set to less
than 1.0 as opposed to it being a bug.
---
topspace.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/topspace.el b/topspace.el
index e890083e4e..8020e0d09a 100644
--- a/topspace.el
+++ b/topspace.el
@@ -614,10 +614,9 @@ If that doesn't work it uses `topspace--count-lines-slow'."
(cond
((= (round height) 0) "")
((= (round height) 1)
- ;; comment a) It seems there is a bug in Emacs where you cannot set a
- ;; string's line-height to a positive float less than 1. So in this
- ;; condition, settle for rounding the top space height up to 1
- ;; TODO: open issue with Emacs devel mailing list for this
+ ;; comment a) You cannot set a string's line-height
+ ;; to a positive float less than 1. So in this condition,
+ ;; settle for rounding the top space height up to 1
"\n")
(t
;; set the text to a series of newline characters with the last line
@@ -691,7 +690,8 @@ ARG defaults to 1."
(defun topspace--post-command ()
"Reduce top space height before the cursor can move past `window-end'."
- (when (= topspace--pre-command-window-start 1)
+ (when (and (= topspace--pre-command-window-start 1)
+ (> (point) topspace--pre-command-point))
(let ((next-line-point))
(save-excursion
(goto-char topspace--pre-command-point)
- [elpa] externals/topspace d3182133f9 144/181: Increase test coverage, (continued)
- [elpa] externals/topspace d3182133f9 144/181: Increase test coverage, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 186ea6091a 148/181: Internal optimizations and refactoring, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace bc35cd92d5 149/181: Update test.yml, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 5c2b095a13 150/181: Update cached coveralls badge, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 50ca92c72d 152/181: Update cached coveralls badge, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace ce7fc98008 153/181: Internal refactoring, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 86127bf20f 160/181: Performance optimization, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 543f835124 163/181: Set NEWS version head back to Unreleased, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 6f5d60ea36 166/181: Update NEWS.md, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace dd7d35b52d 168/181: Fix links in CONTRIBUTING.md, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 6692cd1346 169/181: Performance optimization,
ELPA Syncer <=
- [elpa] externals/topspace bb73278f40 170/181: Update description, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 9dd0ce4d42 172/181: Update description, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace d364f55550 173/181: Update description, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace be86d5ba9b 180/181: Prevent line `1` indicator sometimes displaying too high in `linum-mode` (#22), ELPA Syncer, 2022/08/23
- [elpa] externals/topspace ccc5c23731 176/181: Update description, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 0399f73f9b 179/181: Update description, ELPA Syncer, 2022/08/23