Bram Moolenaar wrote:
Brett Stahlman wrote:

I've noticed that Vim displays the "NO-BREAK SPACE" character (Unicode 00A0) incorrectly for several single-byte encodings (e.g., cp437, cp850 and cp775), which typically encode it as 0xFF.

To reproduce...
:set enc=cp850
Enter the following 2 lines in an empty buffer...
<ff>2345
12345
...where <ff> represents the character at code point 0xff, entered with CTRL-V.

The non-breaking space is displayed normally (like a regular space character) until the cursor is moved onto it, whereupon the cursor becomes 4 characters wide, covering (and effectively erasing) all but the "5" on the first row. The covered characters are not redrawn when the cursor is moved down a row with j. If you then use CTRL-L to redraw, the covered characters are redrawn, but shifted rightward from their original location. Move the cursor back up to the line with the non-breaking space, then move it left and right, and you'll see the characters redrawn in the 2 different spots, sometimes simultaneously.

Vim probably doesn't know that 0xff is a space or any special character.
After setting the 'encoding', you also need to set 'isprint'.

If you set 'isprint' properly, does the problem go away?


No. 'isprint' was already set to the Linux default, which includes 255: i.e.,
        @,161-255

Thanks, Brett Stahlman

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to