[PATCH] long lines inside verbatim block (#v+/#v-) grabble last but one line
Dennis Preiser <[email protected]> Thu, 11 Sep 2008 16:28:13 +0200
| Newsgroups | gmane.network.tin.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello, > when scrolling down linewise > <news://news.software.nntp/[email protected]> > the artcile it "messes" up the last but one line in cooked mode > (not in raw mode) when it reaches the long-line inside a verbatim > block > (#v+/#v-) (80x24 xterm, tinrc.wrap_column=0): > > #v+ > if (preg_match('/^(comp|humanities|misc|news|rec|sci|soc| > talk)\./', > $groupName)) > #v- > > the "upName))" string appears in the last but one line (the line > usualy is > blank) and stays there till the screen is refreshed ('^L'). the line in question contains a "Tab". The verbatim code in cook.c:process_text_body_part() does not handle this before it calls put_cooked(). The patch below should fix this. Dennis --- cook.c.orig 2008-05-13 10:45:13.000000000 +0200 +++ cook.c 2008-09-10 16:47:24.000000000 +0200 @@ -576,10 +576,14 @@ process_text_body_part( /* * Don't do any further handling of uue || verbatim lines */ - if (in_uue || verbatim) { + if (in_uue) { put_cooked(max_line_len, wrap_lines, flags, "%s", line); continue; - } + } else if (verbatim) { + expand_ctrl_chars(&line, &max_line_len, 8); + put_cooked(max_line_len, wrap_lines, flags, "%s", line); + continue; + } #ifdef HAVE_COLOR if (quote_regex3.re) {