[patch] g8 displays 0a instead of 00 on NUL character

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[patch] g8 displays 0a instead of 00 on NUL character

Dominique Pellé

When pressing  g8  in normal mode on the NUL character <00>,
Vim-7.3 (and older) displays 0a. It should display 00.  The ":ascii"
Ex command correctly displays <<00>>.

Steps to reproduce:

1) Create a file with NUL char in it:

  $ perl -e 'print chr(0)' > test.txt

2) Run:

  $ vim -u NONE -c ":set display=uhex" -c ":norm g8" test.txt

3) Observe that Vim displays 0a at the bottom of the screen instead
of the expected 00.

Attached patch fixes it.
-- Dominique

You received this message from the "vim_dev" 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

fixed-g8-mbyte.c-7.3a.patch (3K) Download Attachment