In a custom 'statusline', items %b or %B mean the current character, not necessarily the current byte. For instance, if 'encoding' is UTF-8, the status line string

        U+%04B

will display the Unicode codepoint under the cursor according to the usual conventions: U+ 4 hex digits in the BMP (U+0000 to U+FFFF), or U+ as many hex digits as necessary (normally 5 or 6) outside the BMP (i.e. U+10000 and higher — the Unicode Consortium currently allows codepoints up to U+10FFFD, where U+F0000 and higher, among others, are "for private use"; Vim allows codepoints up to U+7FFFFFFF). Similarly with lowercase b but in decimal (I just checked them both).

See the attached proposed patch to options.txt. This patch was constructed according to the "traditional Vim" patching conventions (to apply it, start at the parent of runtime/ src/ etc., patch using -p0, and non-unified context diff) rather than "Mercurial" patching conventions (start at the same point but patch using -p1, and unified context diff).

I *think* that transmission via email will have converted all ends of lines to "dos-style" (CR+LF rather than my usual "unix-style" LF) but I'm not 100% sure.


Best regards,
Tony.
--
I gave up Smoking, Drinking and Sex.  It was the most *horrifying* 20
minutes of my life!

--
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
*** ../vim73/runtime/doc/options.txt	2011-02-09 21:05:33.000000000 +0100
--- runtime/doc/options.txt	2011-02-10 05:45:09.000000000 +0100
***************
*** 1,4 ****
! *options.txt*	For Vim version 7.3.  Last change: 2011 Jan 30
  
  
  		  VIM REFERENCE MANUAL	  by Bram Moolenaar
--- 1,4 ----
! *options.txt*	For Vim version 7.3.  Last change: 2011 Feb 10
  
  
  		  VIM REFERENCE MANUAL	  by Bram Moolenaar
***************
*** 6554,6560 ****
  	k S   Value of "b:keymap_name" or 'keymap' when |:lmap| mappings are
  	      being used: "<keymap>"
  	n N   Buffer number.
! 	b N   Value of byte under cursor.
  	B N   As above, in hexadecimal.
  	o N   Byte number in file of byte under cursor, first byte is 1.
  	      Mnemonic: Offset from start of file (with one added)
--- 6554,6560 ----
  	k S   Value of "b:keymap_name" or 'keymap' when |:lmap| mappings are
  	      being used: "<keymap>"
  	n N   Buffer number.
! 	b N   Value of character under cursor.
  	B N   As above, in hexadecimal.
  	o N   Byte number in file of byte under cursor, first byte is 1.
  	      Mnemonic: Offset from start of file (with one added)

Raspunde prin e-mail lui