From: Noam Postavsky <npostavs@gmail.com>
To: John Shahid <jvshahid@gmail.com>
Cc: 31662@debbugs.gnu.org
Subject: bug#31662: [PATCH] fix double counting bug in term.el
Date: Thu, 31 May 2018 18:51:06 -0400 [thread overview]
Message-ID: <87sh67bfs5.fsf@gmail.com> (raw)
In-Reply-To: <87muwgpgy6.fsf@gmail.com> (John Shahid's message of "Thu, 31 May 2018 04:49:53 +0000")
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"))
next prev parent reply other threads:[~2018-05-31 22:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-31 4:49 bug#31662: [PATCH] fix double counting bug in term.el John Shahid
2018-05-31 22:51 ` Noam Postavsky [this message]
2018-06-01 2:51 ` John Shahid
2018-06-02 2:24 ` Noam Postavsky
2018-06-02 2:43 ` John Shahid
2018-06-02 3:13 ` Noam Postavsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sh67bfs5.fsf@gmail.com \
--to=npostavs@gmail.com \
--cc=31662@debbugs.gnu.org \
--cc=jvshahid@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.