diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-02-09 08:12:10 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-02-09 08:12:14 +0100 |
commit | f3fd9591cfca5450b4bc74274340f24068f96fc7 (patch) | |
tree | dbc7b22f9e7fb40ca63ae17a22b09fb35d6816f0 /test/lisp/simple-tests.el | |
parent | 69943ae70ce0aec075bd26ad0100c174b34bad7f (diff) | |
download | emacs-f3fd9591cfca5450b4bc74274340f24068f96fc7.tar.gz |
Fix count-lines problem in non-ASCII buffers
* src/fns.c (Fline_number_at_pos): Get the correct start position
in non-ASCII buffers (bug#22763).
Diffstat (limited to 'test/lisp/simple-tests.el')
-rw-r--r-- | test/lisp/simple-tests.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el index b4007a6c3f3..f2ddc2e3fb3 100644 --- a/test/lisp/simple-tests.el +++ b/test/lisp/simple-tests.el @@ -67,6 +67,11 @@ (insert (propertize "\nbar\nbaz\nzut" 'invisible t)) (should (= (count-lines (point-min) (point-max) t) 2)))) +(ert-deftest simple-text-count-lines-non-ascii () + (with-temp-buffer + (insert "あ\nい\nう\nえ\nお\n") + (should (= (count-lines (point) (point)) 0)))) + ;;; `transpose-sexps' (defmacro simple-test--transpositions (&rest body) |