From 1ae2ed41e5082fe986872fc57c200791199d826c Mon Sep 17 00:00:00 2001 From: dece Date: Sun, 16 May 2021 19:37:27 +0200 Subject: [PATCH] textbox: find C-e issue --- bebop/textbox.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bebop/textbox.py b/bebop/textbox.py index d1c4f5d..d16f88c 100644 --- a/bebop/textbox.py +++ b/bebop/textbox.py @@ -51,12 +51,11 @@ class Textbox: def _end_of_line(self): """Return the index of the last non-blank character.""" - logging.debug(f"_end_of_line stripspaces {self.stripspaces}") + logging.debug(f"textpad._end_of_line") self._update_maxx() last = self.maxx while True: last_ch = curses.ascii.ascii(self.win.inch(0, last)) - logging.debug("last_ch " + str(last_ch)) if last_ch != curses.ascii.SP: last = min(self.maxx, last + 1) break @@ -66,7 +65,7 @@ class Textbox: return last def _insert_printable_char(self, ch): - logging.debug(f"_insert_printable_char {ch}") + logging.debug(f"textpad._insert_printable_char {ch}") self._update_maxx() _, x = self.win.getyx() backx = None @@ -94,7 +93,7 @@ class Textbox: def do_command(self, ch): """Process a single editing command.""" - logging.debug(f"do_command {ch}") + logging.debug(f"textpad.do_command {ch}") self._update_maxx() _, x = self.win.getyx() if curses.ascii.isprint(ch): @@ -121,7 +120,6 @@ class Textbox: self.win.move(0, self._end_of_line()) else: self.win.move(0, self.maxx) - self.win.move(0, self.maxx) elif ch in (curses.ascii.ACK, curses.KEY_RIGHT): # ^f if x < self.maxx: self.win.move(0, x + 1)