diff options
| author | Eli Zaretskii <eliz@gnu.org> | 2026-05-28 18:36:11 +0300 |
|---|---|---|
| committer | Eli Zaretskii <eliz@gnu.org> | 2026-05-28 18:36:11 +0300 |
| commit | 7ee33143981199184e8b12db12ed7d0a26b947f5 (patch) | |
| tree | 1e1a3d8d23dd60bd3f90eac9bdebfb1ee900ef4b /test | |
| parent | 833553dd9aec0072961a7f1a7797f9481855a07f (diff) | |
Speed-up cursor motion under 'display-line-numbers-mode'
* src/xfaces.c (Finternal_lisp_face_equal_p): Accept an additional
optional argument INHERIT; if non-nil, consider two faces equal if
one inherits from the other and doesn't specify any other
attributes to be different from it.
* src/xdisp.c (try_cursor_movement, try_window_id): Call
'Finternal_lisp_face_equal_p' with non-nil INHERIT argument, to
speed up redisplay in the default case when line numbers are shown.
(Bug#81133)
* test/src/xfaces-tests.el (xfaces-test-face-equality): New test.
Diffstat (limited to 'test')
| -rw-r--r-- | test/src/xfaces-tests.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/src/xfaces-tests.el b/test/src/xfaces-tests.el index ae57909a664..e79d2e88543 100644 --- a/test/src/xfaces-tests.el +++ b/test/src/xfaces-tests.el @@ -65,6 +65,16 @@ 'button)))) (kill-buffer buf))) +(ert-deftest xfaces-test-face-equality () + "Test `internal-lisp-face-equal-p'." + (should (internal-lisp-face-equal-p 'default 'default)) + (should-not (internal-lisp-face-equal-p 'default 'region)) + (should-not (internal-lisp-face-equal-p 'line-number 'default)) + (should-not (internal-lisp-face-equal-p 'line-number ' + line-number-current-line)) + (should (internal-lisp-face-equal-p 'line-number + 'line-number-current-line t))) + (provide 'xfaces-tests) ;;; xfaces-tests.el ends here |
