[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil bdbf41bb91 1/2: Fix evil-test-logical-visual-next-lin
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil bdbf41bb91 1/2: Fix evil-test-logical-visual-next-line in GUI |
Date: |
Fri, 17 Mar 2023 07:00:13 -0400 (EDT) |
branch: elpa/evil
commit bdbf41bb91792418f96049d063c5d28a0777dad2
Author: Axel Forsman <axelsfor@gmail.com>
Commit: Axel Forsman <axelsfor@gmail.com>
Fix evil-test-logical-visual-next-line in GUI
The test was passing when run on text terminals but not on graphical
terminals. This was because in TUIs, wrapping is indicated by a
backslash that counts toward the width returned by window-width, but in
GUIs a bent arrow (↩) is placed in the fringe instead, so one more
character was needed in order to display a continuation line.
---
evil-tests.el | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/evil-tests.el b/evil-tests.el
index 1940333031..0a0bb4c2bf 100644
--- a/evil-tests.el
+++ b/evil-tests.el
@@ -3425,15 +3425,14 @@ Below some empty line"
(ert-deftest evil-test-logical-visual-next-line ()
"Test alternating between logical and visual next/previous line motions."
:tags '(evil motion)
- (skip-unless (and (not noninteractive) (> (window-width) 1)))
- (evil-test-buffer
- "[]\nyy\n"
- (insert (make-string (window-width) ?x)) ; Make first line soft-wrap
- (goto-char (point-min))
- ("gjj")
- (should (= (current-column) 1))
- ("Gkgk")
- (should (evil-eolp))))
+ (skip-unless (and (not noninteractive) (> (window-width) 2)))
+ (evil-test-buffer "[x]\nyy\n"
+ (insert (make-string (window-width) ?x)) ; Make first line soft-wrap
+ (goto-char (point-min))
+ ("gjj")
+ (should (= (current-column) 1))
+ ("Gkgk")
+ (should (not (bolp)))))
(ert-deftest evil-test-other-commands-preserve-column ()
"Test other comamnds preserve the column, when appropriate."