Commit Graph

13 Commits

Author SHA1 Message Date
Baptiste Daroussin
755cc40c21 Update nvi to 2.2.0-05ed8b9
This version incorporates many fixes in particular a fix for vi -w
Another approach was proposed to merge those fixes (see review), I find
it easier to track changes if we keep importing snapshot on regular
basis

PR:		241985
Reported by:	fernape
Differential Revision:	https://reviews.freebsd.org/D26158
2020-10-01 04:46:23 +00:00
Baptiste Daroussin
110d525ec6 Update nvi to 2.2.0
Main changes:
* Vim-style expandtab option
* Provides Turkish translation
* Backspace now deletes \ rather than being escaped
* T during motion commands is now VI-compatible
* Encoding related fixes, such as UTF-8 detection
* Fixed a number of memory management issues

MFC after:	3 weeks
2020-09-09 08:38:47 +00:00
Yuri Pankov
1a176e87df Revert r362148.
Breaks UTF-8 input for new or having only 7bit characters present files.

Reported by:	glebius
2020-06-22 22:59:03 +00:00
Yuri Pankov
38f168e1a3 nvi: fallback to ISO8859-1 as last resort
Current logic of using user's locale encoding that is UTF-8 doesn't make
much sense if we already failed the looks_utf8() check and skipped
encoding set using "fileencoding" as being UTF-8 as well; fallback to
ISO8859-1 in that case.

Reviewed by:	Zhihao Yuan <lichray@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D24919
2020-06-13 14:11:02 +00:00
Baptiste Daroussin
c271fa9295 Update nvi to 2.1.3 which fixes the data corruption when locale conversion
failed
2015-04-10 17:50:28 +00:00
Peter Wemm
f0957ccae4 Update nvi-1.79 to 2.1.1-4334a8297f
This is the gsoc-2011 project to clean up and backport multibyte support
from other nvi forks in a form we can use.

USE_WIDECHAR is on unless building for the rescue crunchgen. This should
allow editing in the native locale encoding.

USE_ICONV depends on make.conf having 'WITH_ICONV=YES' for now.  This
adds the ability to do things like edit a KOI8-R file while having $LANG
set to (say) en_US.UTF-8.  iconv is used to transcode the characters for
display.

Other points:
* It uses gencat and catopen/etc instead of homegrown msg catalog stuff.
* A lot of stuff has been trimmed out, eg: the perl and tcl bindings which
  we could never use in base anyway.
* It uses ncursesw when in widechar mode.  This could be interesting.

GSoC info: http://www.google-melange.com/gsoc/proposal/review/google/gsoc2011/zy/1
Repo at: https://github.com/lichray/nvi2

Obtained from:  Zhihao Yuan <lichray@gmail.com>
2013-08-11 20:03:12 +00:00
Peter Wemm
84ed61ee23 Post-cvs2svn flatten pass. 2013-08-11 08:38:10 +00:00
Jaakko Heinonen
29c4b7861b Rename O_DIRECTORY to O_TMP_DIRECTORY to avoid shadowing the fcntl.h
O_DIRECTORY flag.

PR:		bin/173924
Obtained from:	git://repo.or.cz/nvi.git
2013-05-15 18:41:49 +00:00
Jordan K. Hubbard
3f2d9117d4 Close buffer overflow noted in security advisory DSA-085.
Submitted by:	Koga Youichirou <y-koga@jp.FreeBSD.org>
Obtained from:	Debian
2001-10-26 08:25:32 +00:00
David E. O'Brien
fbd7787b32 It is just stupid to have to do ``<ESC>!rm -f %'' to write a file you own.
So lets stop that nonsense and allow `w!' to do something useful.

Submitted by:	green
2001-07-09 04:11:33 +00:00
Kris Kennaway
4f38e89827 10 X's in mkstemp(). 2000-01-10 09:17:46 +00:00
Brian Somers
2e4e1ffe62 Set the close-on-exec flag when we lock the file we're editing.
This prevents any background sub-command executed from inheriting
the descriptor & lock (and making vi think that someone else is
editing the file when it re-edits).

Remembered from: An OpenBSD commit message from May '99
1999-08-06 08:34:42 +00:00
Peter Wemm
b8ba871bd9 Import of nvi-1.79, minus a few bits that we dont need (eg: postscript
files, curses, db, regex etc that we already have).  The other glue will
follow shortly.

Obtained from: Keith Bostic <bostic@bostic.com>
1996-11-01 06:45:43 +00:00