Date: Tue, 21 May 2019 21:01:40 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 225096] [libteken] [PATCH] Add reverse wrap around to libteken Message-ID: <bug-225096-227-oGmoj5CZbP@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-225096-227@https.bugs.freebsd.org/bugzilla/> References: <bug-225096-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D225096 --- Comment #3 from Ed Schouten <ed@FreeBSD.org> --- Hey! The patch looks decent, but I'm wondering whether it's possible to mer= ge some of the now redundant logic in teken_subr_backspace(), e.g.: ... } else { if (t->t_cursor.tp_col =3D=3D 0) { if ((t->t_stateflags & TS_REVWRAP) =3D=3D 0) return; t->t_cursor.tp_row--; t->t_cursor.tp_col =3D t->t_winsize.tp_col - 2; } else { t->t_cursor.tp_col--; t->t_stateflags &=3D ~TS_WRAPPED; } } Also, I think you might need to take TS_WRAPPED into account. Depending on = the value of that flag, you may need to jump to 't->t_winsize.tp_col - 1' or 't->t_winsize.tp_col - 2'. Also, feel free to remove the teken_printf() calls there. They were just a debugging aid to display unsupported escape sequences. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-225096-227-oGmoj5CZbP>