"Jeremy Baxter" <j...@disroot.org> wrote: > Hi all, I'm trying to disable the horizontal line scrolling feature in ksh, > enabled through `set -o vi' or `set -o emacs'. ksh(1) says this about it: > > In these editing modes, if a line is longer than the screen width (see > the COLUMNS parameter), a `>', `+', or `<' character is displayed in > the last column indicating that there are more characters after, before > and after, or before the current position, respectively. The line is > scrolled horizontally as necessary. > > Is it possible to completely disable this feature at the moment? Setting > COLUMNS to a large number "disables" it for the most part but brings in > other weird behaviours like massive gaps between lines when pressing > ctrl-u and random newlines showing up when scrolling through history.
Hi, Jeremy, The display() function in /usr/src/bin/ksh/vi.c goes something like this: static void display(char *wb1, char *wb2, int leftside) { ... int moreright; ... moreright = 0; ... if (col < winwidth) { ... } else moreright++; ... /* Update the "more character". */ if (es->winleft > 0 && moreright) /* POSIX says to use * for this but that is a globbing * character and may confuse people; + is more innocuous */ mc = '+'; else if (es->winleft > 0) mc = '<'; else if (moreright) mc = '>'; else mc = ' '; if (mc != morec) { ed_mov_opt(pwidth + winwidth + 1, wb1); x_putc(mc); cur_col++; morec = mc; lastb = -1; } ... } I assume, the logic is similar for the emacs mode. So, unless I missed something, disabling both the vi and emacs modes is the only way to get rid of the behaviour. -- Alexander