chad@anasaz.UUCP (Chad R. Larson) (09/27/89)
When less (version 97) is running with the "-c" option, it paints new data from the top down, and clears each screen line immediately before writing a new one. This gets confused when outputting lines wider than the physical screen on terminals that do auto-margin line wrapping. The continuation line can have left-over data from the previous screen sticking out to the right margin. This patch fixes the problem. NOTE: The old code made outputting a newline character at the end of an output line conditional on the termcap entries for auto-margins and the VT100 glitch check. I can't see the reason why and dropped it in my patch. If I'm braindamaged and that was necessary, 'scuse me. *** output.c.sav Wed Apr 19 17:52:18 1989 --- output.c Wed Apr 19 18:24:02 1989 *************** *** 95,102 **** } } } ! if (column < sc_width || !auto_wrap || ignaw) ! putchr('\n'); } /* --- 95,103 ---- } } } ! if (column > sc_width && auto_wrap) ! clear_eol(); ! putchr('\n'); } /*