Bug 22182 - vi(1) options noprint/print/octal broken
Summary: vi(1) options noprint/print/octal broken
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 5.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-10-21 14:40 UTC by Christian Weisgerber
Modified: 2017-12-14 21:33 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (3.15 KB, patch)
2000-10-21 14:40 UTC, Christian Weisgerber
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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/