On Sun, Mar 02, 2008 at 11:19:34PM +0100, Otto Moerbeek wrote:Hey guys, could you give this patch a try? I believe it fixes the problem, but I have not been able to test it extensively. The code that keeps track of the number of columns a particular line takes was not quite right. Without this patch, "curoff" is behind by 8 characters, and so when you hit a tab at the beginning of the second terminal line, the TAB_RESET macro actually subtracts 8 from scno. So at the beginning of the second terminal line scno (the number of columns) is 80, then after another tab it is still at 80, which causes all sorts of stuff to go haywire :P -Nate --- vs_relative.c.orig Tue Mar 4 00:54:55 2008 +++ vs_relative.c Tue Mar 4 00:55:06 2008 @@ -117,10 +117,13 @@ * Initialize the screen offset. */ scno = 0; + curoff = 0; /* Leading number if O_NUMBER option set. */ - if (O_ISSET(sp, O_NUMBER)) + if (O_ISSET(sp, O_NUMBER)) { scno += O_NUMBER_LENGTH; + curoff += O_NUMBER_LENGTH; + } /* Need the line to go any further. */ if (lp == NULL) { @@ -141,11 +144,9 @@ leftright = O_ISSET(sp, O_LEFTRIGHT); /* - * Initialize the pointer into the buffer and screen and current - * offsets. + * Initialize the pointer into the buffer. */ p = lp; - curoff = 0; /* Macro to return the display length of any signal character. */ #define CHLEN(val) (ch = *(u_char *)p++) == '\t' && \
| Matthew Wilcox | Re: AIM7 40% regression with 2.6.26-rc1 |
| Linus Torvalds | Re: LSM conversion to static interface |
| Oliver Pinter | Re: x86: 4kstacks default |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Arjan van de Ven | Re: [GIT]: Networking |
| Frans Pop | svc: failed to register lockdv1 RPC service (errno 97). |
| Ingo Molnar | [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison overwritten |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
