Bug 22182

Summary: vi(1) options noprint/print/octal broken
Product: Base System Reporter: Christian Weisgerber <naddy>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: gonzo
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Christian Weisgerber 2000-10-21 14:40:01 UTC
There's a bug in our vi (nvi 1.79).  The options "noprint", "print",
and "octal" don't work properly.  When these options are changed,
the routine that evaluates them is called before the option has
been set.

Fix: From NetBSD:
How-To-Repeat: 
For option "octal":
* Insert a non-printable character >0x80.
* :set octal
  => The character is still displayed in hex.
* :set nooctal
  => The display switches to octal.

Similarly for "print" and "noprint".
Comment 1 zhihao.yuan 2013-12-09 18:43:27 UTC
Fixed without additional flags in -CURRENT.

PS: you may need LC_CTYPE=C (8-bit mode) to test this feature if the
non-printable character is not a valid Unicode character.

-- 
Zhihao Yuan <zhihao.yuan@rackspace.com>
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://4bsd.biz/