Sunday, March 19, 2023

Re: digraph_get('NU') returns 0xA

> :echo char2nr(digraph_get('NU')) prints "10". this would seem to disagree
> with :h digraphs, which says that NU maps to "0" i.e. the null char. I
> don't think this is the result of an override as i certainly haven't tried
> to enact one and it happens even with -u NONE.

Since the NUL byte terminates a string in C, it is internally replaced
with NL, 0x0A. When written to a file it is changed back to a NUL.
I most places you don't notice this, but sometimes it does.

> is this a bug?

Nope.

--
DINGO: Wicked wicked Zoot ... she is a bad person and she must pay the
penalty. And here in Castle Anthrax, we have but one punishment
... you must tie her down on a bed ... and spank her. Come!
GIRLS: A spanking! A spanking!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20230319215736.CCD371C135C%40moolenaar.net.

No comments:

Post a Comment