[Bug 225096] [libteken] [PATCH] Add reverse wrap around to libteken

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue May 21 21:01:43 UTC 2019


--- Comment #3 from Ed Schouten <ed at FreeBSD.org> ---
Hey! The patch looks decent, but I'm wondering whether it's possible to merge
some of the now redundant logic in teken_subr_backspace(), e.g.:

} else {
    if (t->t_cursor.tp_col == 0) {
        if ((t->t_stateflags & TS_REVWRAP) == 0)
        t->t_cursor.tp_col = t->t_winsize.tp_col - 2;
    } else {
        t->t_stateflags &= ~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.

You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-bugs mailing list