Commit Graph

65 Commits

Author SHA1 Message Date
mrg 3cdf6fedc7 initialise from_cs[1] instead of from_cs[0] twice. from GCC 4.5.3. 2011-06-22 03:57:46 +00:00
tnozaki 80356df9b8 1. fix PR/44455, nonprintable character doesn't show hex-visual
under big endian.
2. ":set octal" with nonprintable character causes nbwcurses move error.
3. moving (big)words by wW/eE/bB can't handle non-ascii characters.
4. toggle uppercase/lowercase by ~ can't handle non-ascii characters.
5. don't feed CHAR_T(=wchar_t) to is* function directly.
   is* funcs with over UCHAR_MAX value may cause undefined behavior.
   some ctype implementation(such as FreeBSD) return unexpected
   result(same result as isw* func).
6. using non-ascii digit character with count/line number of ex/vi
   command may causes unexpeced result.
2011-03-21 14:53:02 +00:00
schnoebe 041d7f637f bin/44088
Change the initialization state of gtagsmode to 0, (unset).

This brings about least astonishment for users, permittings tags
functionality to work as expected.
2010-11-14 20:53:54 +00:00
christos cefc0995de PR/44006: Ralph G: vi: CTRL-A does not handle end-of-word correctly
End-of-word was not included in search regexp leading to false positives.
http://patches.ubuntu.com/by-release/extracted/debian/n/nvi/1.81.6-7/15search_word.dpatch
2010-10-28 18:12:47 +00:00
wiz eb06495b27 refering -> referring, per PR 43814. 2010-08-30 10:41:54 +00:00
tnozaki 50eb6aadde cast isblank(3)'s argument to unsigned char. 2010-05-13 17:52:11 +00:00
roy 98eb889579 Userland now builds and uses terminfo instead of termcap.
OK: core@, jdc@
2010-02-03 15:34:37 +00:00
mlelstv c96a848326 Use wide char versions of tolower/toupper/islower/isupper where
appropriate. Fixes ~ command on big-endian architectures.
2009-12-23 12:44:21 +00:00
tnozaki b95326704e don't use pathname directly as msgq()'s first argument of format string. 2009-11-24 13:12:01 +00:00
dsl b87a655a0d Fix all formats for 64bit builds 2009-11-15 18:43:28 +00:00
dsl 08ad4f398f Need %zu for size_t 2009-11-15 18:23:08 +00:00
christos 55e651517c one more printf like function, and fix the lossage. 2009-11-14 23:40:11 +00:00
christos 1070653ee5 Add a gcc printf attribute to the printf functions and fix the lossage caught. 2009-11-14 23:31:37 +00:00
tnozaki 6114d6b7fd fix format string bug, filename may contain % character, don't use it as format string. 2009-11-14 20:01:20 +00:00
dsl ba3675f1ae Fix regexp on LP64 systems.
By the time 'states1' was expanded, it became 'char *' so the code tried
to put 64 bits into an int!
Fixed PR/41924
2009-10-31 20:11:53 +00:00
dsl f4f40b1fe1 Save command in :w !<command> for later :w !!
Fixes PR/8169
2009-10-31 14:30:55 +00:00
tnn e0331d273d Print a warning if TERM is not set and stdin is a tty. PR bin/42144. 2009-10-20 16:17:07 +00:00
tnozaki 3b1fe73ae9 fix bin/41781, the pattern /\$/ doesn't match a dollar sign anymore by default. 2009-08-30 14:57:51 +00:00
aymeric 46545ebf5c bump to nb5:
. :ESC works again
. #+ and #- work again
2009-08-11 21:42:03 +00:00
aymeric 7963ec5bf2 . adding STRCHR variants to common/multibyte.h for the benefit of
. making #+ and #- work again in vi/v_increment.c
2009-08-11 21:28:02 +00:00
aymeric b8018f6743 in v_ecl(), copy the converter from the shadow screen initialized in
v_ecl_init(), so that history can be displayed and edited.

Which means, :ESC works again.
2009-08-11 21:24:49 +00:00
lukem 86814cdb3c Crank version to nb4 2009-08-07 16:32:43 +00:00
lukem ddff3f7108 Rename "expandtabs" to "expandtab" to match documentation (and vim,
where I got the idea from).
Actually implement the "et" abbreviation for expandtab.
2009-08-07 16:19:53 +00:00
tnozaki 41a9bd5969 fix reliability issue.
if wcwidth(3) return -1, nvi may crash by memory fault.
2009-04-19 02:28:19 +00:00
tnozaki 4bdba43474 fix PR/41136: \<word search doesn't work in vi
don't reuse RCHAR_T(=wchar_t)'s bits, CSI wchar_t is opaque object.
2009-04-12 14:47:51 +00:00
jld 09d4e48298 Make vi's '@' command work again; a precedence warning fix in r1.2 added
parens in the wrong place such that '@' did nothing.  Needs pullup to -5.

Reported by Ed Ravin; fixes PR 41134.
2009-04-04 01:13:42 +00:00
tnozaki 63b0517c27 fix following wregexp bug reported in current-user:
- . doesn't match anything
  - [] groups containing more than one character don't match anything
introduced by -Wsign-compare fix.
2009-02-22 11:34:53 +00:00
christos 7842bfc111 check for memcpy too 2009-01-27 16:50:08 +00:00
lukem 53fcdb3604 sign-compare fixes for amd64 2009-01-22 10:33:58 +00:00
lukem cadac39416 fix -Wsign-compare issues 2009-01-18 03:43:45 +00:00
christos 45220987b8 PR/40414: Peter Bex: nvi abort()s in autoindent/autoindent differs from
historical vi
2009-01-16 15:05:55 +00:00
christos c06deb4e8c PR/40386: M. Levinson: vi(1) filename completion no longer works, fix bug
introduced by shadow variable fix.
2009-01-13 15:43:27 +00:00
tnozaki 1f0834dfa8 make CHAR_T/RCHAR_T as 32bit clean.
nvi-1.81 restrict wchar_t as 24bit, so under some locale(eg. zh_CN.GB18030)
search/regex doesn't work and sometimes dumps core(because of negative wchar_t value).
2009-01-02 00:32:11 +00:00
tsutsui 593ae76032 Suppress false -Wuninitialized warning on gcc -O1. 2008-12-13 09:17:48 +00:00
lukem e7617fb9ab Bump the version to ""nvi-1.81.6nb1" for NetBSD changes:
expandtab
	gtagsmode
	matchchars
	WARNS=4

Per discussion with Christos.
2008-12-12 23:05:36 +00:00
lukem 534002bc26 Implement "expandtab" option:
expandtab, et [off]
          Prevent the use of <tab> characters in leading whitespace when
          shifting text, autoindenting, indenting with <control-T>, or
          outdenting with <control-D>.
2008-12-12 22:55:55 +00:00
christos 37d07dacae PR/40144: Christoph Badura: quiting from vi recovery mode leaves tty settings
garbled. When vi creates a new EXF structure it did not set all the fd related
fields to -1, so if the fd field was never initialized, it was 0 because of
the calloc() call, so closing the file, ended up closing 0, so the terminal
fd was closed and that prevented the ioctl to restore the term settings from
succeeding.
2008-12-09 18:26:20 +00:00
christos 99089c99f7 PR/40140: Takehiko NOZAKI: fix bug where nvi + x(delete) key may call abort(3) 2008-12-09 16:50:22 +00:00
christos 2b08d9050e uninitialized variable. 2008-12-06 23:18:36 +00:00
christos 448e9aef12 more compilation issues on amd64, where size_t != unsigned int. 2008-12-06 18:39:20 +00:00
christos ba7207e4b2 WARNS=4 2008-12-05 22:51:42 +00:00
christos e2e2aa5d82 make gtags work for real. 2008-10-29 19:57:27 +00:00
christos a987b491ab put back gtagsmode (untested) apb should test. 2008-10-29 17:50:49 +00:00
christos c33f6f922e quote {} 2008-10-02 15:39:43 +00:00
christos 9766bcabdc put back matchchars 2008-10-01 21:20:09 +00:00
christos 739c305b89 fix texinfo errors by adding @node commands as appropriate. 2008-09-01 17:51:49 +00:00
christos c041c3f557 Fix non-wide build botches. 2008-08-27 10:18:41 +00:00
aymeric 100893232d The cursor emulation was broken, which led to O on an existing first line of
a file to fail.
Fixes PR bin/39293 by Adam Hoka.
2008-08-05 15:49:18 +00:00
aymeric c280d5f915 Fix a warning which breaks the build on a few platforms.
XXX may be not the right thing to do, but very little intrusive
2008-06-11 21:32:17 +00:00
aymeric 512a1e067c include <stdlib.h> for exit(3) prototype.
Uncovered by broken bulk builds for a handful of platforms.
2008-06-11 21:30:52 +00:00