This buffer content:
0000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0000010: 0a
When subjected to ':%!xxd -r -g 1' yields a 16 byte buffer and if saved
a sixteen byte file. Note that the input is 17 bytes long.
This buffer content on the other hand:
0000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0a ................
0000010: 00
When subjected to the same command yields the expected 17 byte buffer
and file if saved.
Note that the only difference is the position of the last two bytes is swapped.
This buffer content:
0000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0a ................
0000010: fa
also yields a buffer and file of the correct length.
Using a plain format ascii representation file with the -p option to xxd
gives the same odd results.
It appears that xxd -r has some preternatural hatred for trailing 0a bytes
(and maybe others).
Britton
--
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