Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 225039 - app-editors/vim-7.1.266 - vimmanpager truncates man-pages.
Summary: app-editors/vim-7.1.266 - vimmanpager truncates man-pages.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Vim Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-05 18:43 UTC by Stefan Huber
Modified: 2008-10-10 13:45 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Huber 2008-06-05 18:43:19 UTC
The script /usr/bin/vimmanpager does not contain a "tr '\302' '.'" to remove the specific character and that finally leads to truncated man-pages.

Reproducible: Always

Steps to Reproduce:
1. man fscanf (and others, but not all)

Actual Results:  
Message on console:

  # man fscanf
  col: Invalid or incomplete multibyte or wide character
  Vim: Reading from stdin...

  /usr/bin/vimmanpager: line 9: unexpected EOF while looking for matching `''
  /usr/bin/vimmanpager: line 10: syntax error: unexpected end of file
  Error executing formatting or display command.
  System command (cd "/usr/share/man" && (echo ".ll 9.5i"; echo ".nr LL
  9.5i";   echo ".pl 1100i"; /bin/bzip2 -c -d '/usr/share/man/man3 
  /scanf.3.bz2'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl | /usr/bin
  /nroff -mandoc | /usr/bin/vimmanpager) exited with status 2.


In vim the text is truncated after occurrence of the corresponding character.

Expected Results:  
Showing the whole man-page.

Change script to:

#!/bin/sh
sed -e 's/\x1B\[[[:digit:]]\+m//g' | \
tr '\267' '.' | tr '\302' '.' | col -b | \
		vim \
			-c 'let no_plugin_maps = 1' \
			-c 'set nolist nomod ft=man' \
			-c 'let g:showmarks_enable=0' \
			-c 'runtime! macros/less.vim' -
Comment 1 Carsten Lohrke (RETIRED) gentoo-dev 2008-06-06 02:00:27 UTC
And this binary belongs to which ebuild?
Comment 2 Stefan Huber 2008-06-06 06:56:06 UTC
equery belongs /usr/bin/vimmanpager
[ Searching for file(s) /usr/bin/vimmanpager in *... ]
app-editors/vim-7.1.266 (/usr/bin/vimmanpager -> /usr/share/vim/vim71/macros/manpager.sh)


By the way, maybe its worthwhile to throw away all characters above 0x80 by using "tr '\200-\377' '.'"? Because with "man pdftk" the problem is occurring due to a character 0xc3. And there might be more. However, I'm not a man-page expert and I do not know where this chars come from, but I extracted them by calling "MANPAGER=/bin/cat man pdftk"...
Comment 3 Carsten Lohrke (RETIRED) gentoo-dev 2008-06-06 13:13:30 UTC
(In reply to comment #2)
> equery belongs /usr/bin/vimmanpager

That does work, if you have it installed...
Comment 4 Ian Kelling 2008-08-06 15:27:16 UTC
This could be a seperate bug, but I figured I'd just comment to avoid doing some leg work :) Using xterm & vim both using utf-8, i get

Vim: Reading from stdin...
col: Invalid or incomplete multibyte or wide character

and there is an unexpted EOF on the \267 character. Trying out a simple echo to tr, tr spits out an unprintable character to console when transposing the \267 char. I would assume this is because tr does not support encodings other than latin1.

Also, with utf-8, the tr is unnecessary, those characters work fine in vim.
Comment 5 Julien 2008-10-10 12:21:16 UTC
In utf-8, tr is doing bad job, replacing a part of utf-8 character ยท (MIDDLE DOT 0xC2 0xB7 or \302\267).
Comment 6 Ali Polatel (RETIRED) gentoo-dev 2008-10-10 13:45:10 UTC
Removed the tr from vim.eclass, please reinstall vim for changed to take affect.
Thanks for reporting :)