mirror of
https://github.com/python/cpython.git
synced 2025-09-14 12:46:49 +00:00
[3.13] gh-111201: Add append to screen method to avoid recalculation (GH-119274) (#119405)
(cherry picked from commit c886bece3b
)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
This commit is contained in:
parent
ac9163637b
commit
aefe2e626e
4 changed files with 43 additions and 14 deletions
|
@ -358,7 +358,10 @@ class backward_word(MotionCommand):
|
|||
class self_insert(EditCommand):
|
||||
def do(self) -> None:
|
||||
r = self.reader
|
||||
r.insert(self.event * r.get_arg())
|
||||
text = self.event * r.get_arg()
|
||||
r.insert(text)
|
||||
if len(text) == 1 and r.pos == len(r.buffer):
|
||||
r.calc_screen = r.append_to_screen
|
||||
|
||||
|
||||
class insert_nl(EditCommand):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue