Commit Graph

30 Commits

Author SHA1 Message Date
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
tnozaki
50eb6aadde cast isblank(3)'s argument to unsigned char. 2010-05-13 17:52:11 +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
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
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
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
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
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
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
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
a987b491ab put back gtagsmode (untested) apb should test. 2008-10-29 17:50:49 +00:00
christos
9766bcabdc put back matchchars 2008-10-01 21:20:09 +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
00a7af4852 add a cast to make this file compile on amd64 2008-05-21 16:02:30 +00:00
aymeric
f8f1a54d4c provide the emulation of DB4 with our DB1.
The relevant parts are completely broken or absent in the official release
of nvi
2008-05-20 17:53:18 +00:00
aymeric
fce4fb65c7 include vi_auto.h only if USE_DB4_LOGGING so as not to pull in all the
DB4 logging-related data structures which we don't emulate
2008-05-20 17:38:19 +00:00
aymeric
23de6174f3 iconv()'s second argument is const char **, not char ** 2008-05-20 17:37:04 +00:00
aymeric
ec041c82dd remove these files: we generate them ourselves 2008-05-20 16:58:59 +00:00
aymeric
96bc64d20f Re-import nvi sources, this time based on the distributed tar ball, after
going through the new nvi2netbsd script
2008-05-18 14:29:31 +00:00
aymeric
4d6922cd09 import nvi 1.81.6 verbatim, untouched from the git tree 2008-05-16 18:03:01 +00:00