bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31662: [PATCH] fix double counting bug in term.el


From: Noam Postavsky
Subject: bug#31662: [PATCH] fix double counting bug in term.el
Date: Thu, 31 May 2018 18:51:06 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

John Shahid <jvshahid@gmail.com> writes:
>                    (when (not (or (eobp) term-insert-mode))
>                      (let ((pos (point)))
>                        (term-move-columns columns)
> -                      (delete-region pos (point))))
> +                      (delete-region pos (point))
> +                      (term-move-columns (- columns))))

I think it's a better idea to just reset term-current-column to nil,
like what happens in Emacs 26.

> +  (should (equal "abcde    j"
> +                 (term-test-screen-from-input
> +                  10 12 (concat "\e[mabcdefghij"
> +                                "\e[H"  ;move back to point-min
> +                                "\e[mabcde"
> +                                "\e[m    j"))))
> +

The "\e[m" is just to make the strings get processed separately, right?
You can pass a list of strings instead:

    (term-test-screen-from-input
     10 12 (list "abcdefghij"
                 "\e[H" ;move back to point-min
                 "abcde"
                 "    j"))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]