Commit Graph

145 Commits

Author SHA1 Message Date
Paul Fox
c350485b18 initialize a couple of vars whose warnings were suppressed because
i was building w/ debug on before, which suppresses optimization.
2005-09-16 12:48:18 +00:00
Paul Fox
8552aec7fd some combinations of status line and screen refresh don't give a
correct screen, and bug 215 reports trouble with the status line
on small screens.

with this change a) the status line should always be refreshed
properly, b) the status line is a little shorter than it used to
be ("I" instead of "--INSERT--"), c) the status line will be
truncated if it doesn't fit on the screen, and d) if the screen
is too narrow for an error or transient status message (from
psb() or psbs()), then that message will be followed by a "Hit
Return" prompt.  (it wasn't until i did this last bit that the
size grew.  with this, these changes add about 150 bytes.)

- pgf
2005-09-16 12:20:05 +00:00
Paul Fox
f2de0b7ae4 allow either backspace or DEL, in addition to the user's erase
char, to be used in get_input_line()
2005-09-13 22:20:37 +00:00
Paul Fox
18433aadf6 applying fix for:
0000118: vi join command does not mark file as modified for certain lines.
2005-07-20 17:39:52 +00:00
Paul Fox
d13b90b9e8 allow both ^H and DEL to backspace in insert mode (bug #23) 2005-07-18 22:17:25 +00:00
Eric Andersen
0ef24c672a Fix vi so that error messages, insert mode messages, etc are
all actually displayed in the status line as expected
2005-07-18 10:32:59 +00:00
Mike Frysinger
4e5936ef95 In Bug 208, bernhardf writes:
On machines with only ANSI compliant compilers, not explitily delcaring
an empty parameter list 'void' causes failure.
2005-04-16 04:30:38 +00:00
Eric Andersen
a9eb33ddc7 regularly update the status line display
-Erik
2004-08-19 19:15:06 +00:00
Eric Andersen
165e8cbf34 Assign 'forced' before the goto to avoid a warning 2004-07-20 06:44:46 +00:00
Eric Andersen
aff114c33d Larry Doolittle writes:
This is a bulk spelling fix patch against busybox-1.00-pre10.
If anyone gets a corrupted copy (and cares), let me know and
I will make alternate arrangements.

Erik - please apply.

Authors - please check that I didn't corrupt any meaning.

Package importers - see if any of these changes should be
passed to the upstream authors.

I glossed over lots of sloppy capitalizations, missing apostrophes,
mixed American/British spellings, and German-style compound words.

What is "pretect redefined for test" in cmdedit.c?

Good luck on the 1.00 release!

      - Larry
2004-04-14 17:51:38 +00:00
Eric Andersen
90fb65f7a6 Patch from Thomas Winkler -- vi -R did not work 2004-03-31 11:12:51 +00:00
Eric Andersen
c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Eric Andersen
5cc90eade5 Richard Kojedzinszky writes:
Hi All,

I aplogoize for the mistake, but i have just recognized that somehow the
last patch I sent in was wrong, and a '0' was instead of a '-1'. Because
of this, vi does behave the wrong way. So again, it should be the last
patch for vi. This is for pre7.
2004-02-06 10:36:08 +00:00
Eric Andersen
aeea32ca69 Richard Kojedzinszky writes:
Hi,

I've noticed the bug also, and here is another patch for it. I hope it'll
not introduce more bugs. Not too nice, but works for me.

Here it is for busybox-1.00-pre6
2004-02-04 11:19:44 +00:00
Glenn L McGrath
ee829065cb Patch by Richard Kojedzinszky, when using END at end of lines it was
skipping to next line, cw command was leaving one char in buffer
2004-01-21 10:59:45 +00:00
Eric Andersen
d10f36fe2e Match changes made to cmdedit 2003-12-23 20:45:14 +00:00
Eric Andersen
8efe967018 Be entirely consistant when using ioctl(0, TIOCGWINSZ, &winsize)
to ensure proper fallback behavior on, i.e. serial consoles.
 -Erik
2003-09-15 08:33:45 +00:00
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +00:00
Glenn L McGrath
7127b58baa Fix crashme code, by Jim Treadway 2002-12-03 21:48:15 +00:00
Glenn L McGrath
09adaca37d last_patch_69, 8 bit clean and other fixes from Vladimir N. Oleynik 2002-12-02 21:18:10 +00:00
Aaron Lehmann
a170e1c858 Change if(x)free(x); to free(x); 2002-11-28 11:27:31 +00:00
Eric Andersen
fda2b7ff47 A patch from Jouni Malinen to avoid some buffer overflows in vi,
closing bug #1270
2002-10-26 10:19:19 +00:00
Aaron Lehmann
6fdacc74f0 vi inlining 2002-08-21 13:02:24 +00:00
Robert Griebl
a71389bfe8 Applied a patch from Philip Blundell <pb@nexus.co.uk>:
Added support for ":x" as an alias for ":wq" to vi
2002-07-31 21:22:21 +00:00
Tim Riker
86c76a9c2a fix from kergoth 2002-04-26 07:41:22 +00:00
Matt Kraai
1f0c43668a Remove == TRUE' tests and convert != TRUE' and `== FALSE' tests to use !. 2001-12-20 23:13:26 +00:00
Eric Andersen
bff7a60f63 Patch from "Andrew Tipton" <andrew@cadre5.com> to enable vi cursor
keys while editing.
2001-11-17 07:15:43 +00:00
Eric Andersen
80f5ac7016 Patch from Steve Merrifield <steve@labyrinth.net.au> to make vi
use xmalloc
2001-11-17 06:57:42 +00:00
Matt Kraai
c8227639db Change strdup calls to xstrdup (patch from Steve Merrifield). 2001-11-12 16:57:27 +00:00
Eric Andersen
bdfd0d78bc Major rework of the directory structure and the entire build system.
-Erik
2001-10-24 05:00:29 +00:00
Eric Andersen
fdbac35b33 Patch from Robert J. Osborne <rj@resourceinternational.com> that fixes
a bug in vi where the beginning of the text space was not checked
before dot is decremented for delete and escape sequences on an empty
file.
2001-08-02 05:26:41 +00:00
Matt Kraai
51038a3f42 Don't save and restore readonly flag if BB_FEATURE_VI_READONLY isn't enabled. 2001-07-31 15:01:12 +00:00
Eric Andersen
20aab260e2 Some adjustments, mostly from David McCullough <davidm@lineo.com> to
make busybox be more uClinux friendly.  I also adjusted Config.h for
uClinux so it will automagically disable apps the arn't going to
work without fork() and such.
 -Erik
2001-07-19 22:28:02 +00:00
Eric Andersen
044228d5ec This is vodz' latest patch. Sorry it took so long...
1) ping cleanup (compile fix from this patch already applied).
    2) traceroute call not spare ntohl() now (and reduce size);
    3) Fix for functions not declared static in insmod, ash, vi and mount.
    4) a more simple API cmdedit :))
    5) adds "stopped jobs" warning to ash on Ctrl-D and fixes "ignoreeof" option
    6) reduce exporting library function index->strchr (traceroute), bzero->memset (syslogd)
2001-07-17 01:12:36 +00:00
Eric Andersen
dd8500bce7 Cleanups and sinze reduction for the vi applet from Aaron Lehmann
<aaronl@vitelus.com>
2001-07-02 18:06:14 +00:00
Glenn L McGrath
78b0e379d7 Vladimir's last_patch_15 2001-06-26 02:06:08 +00:00
Eric Andersen
e0c0757d09 These were broken when using dmalloc due to include file ordering
problems.  busybox.h must be last.
 -Erik
2001-06-23 13:49:14 +00:00
Eric Andersen
ddb00545b7 A patch from Aaron Lehmann <aaronl@vitelus.com> to fix a
crash on a broken regexp.
2001-05-13 00:48:09 +00:00
Eric Andersen
c33ebc9741 A patch from Vladimir to use last_char_is(), and a patch from
Larry to fix a silly bug when BB_FEATURE_VI_OPTIMIZE_CURSOR
is not defined.
2001-05-07 22:57:47 +00:00
Eric Andersen
822c3837f9 Another vi update from Sterling Huxley:
- All of the ESC sequences are now in variables.  This should make
  re-targeting for other terminals easier.

- The initial screen draw does not force out every single column.
  Should be faster.

- The place_cursor() routine trys to be smarter about moving the
  cursor.  This is optional based on BB_FEATURE_VI_OPTIMIZE_CURSOR.

- The 't' and 'f' intra-line positioning commands were added.
  They can now be used as targets in 'c' and 'd' commands, i.e.,
   dfx - delete from dot to next 'x'
   dtx - delete from dot to the char before next 'x'

- show_status_line() uses a static int checksum to remember what
  is currently displayed on the screen and not re-draw the status
  line unless it has changed.

- Some of the code in refresh() was moved out to format_line().
  refresh() trys to send out the smallest segment containing
  the changed chars rather than the whole line.

- Added "flash" to the :set command to specify if error indication
  should be by flashing the screen or ringing the bell.

- Changed the rawmode() routine so that it turns off the
  NL -> CR NL translation. On output of a NL, the OS will not add
  a CR.

- If vi was started as "view", with global read-only mode,
  and another file is opened, the file is opened read-only
  rather than read+write.
2001-05-07 17:37:43 +00:00
Eric Andersen
c1bdffe99b Another nice cleanup from Larry. This adds a new last_char_is() function and
uses it to avoid possible buffer underruns whn strlen is zero, and avoid the
possible space-hogging inline of strlen() in several cases.
 -Erik
2001-04-26 15:56:47 +00:00
Eric Andersen
1c0d311ff4 Several fixes from Sterling Huxley for the vi applet. 2001-04-16 15:46:44 +00:00
Eric Andersen
4fd382ea29 Remove unused optarg variable 2001-04-04 19:33:32 +00:00
Eric Andersen
d402edfd63 Some cleanups for libc5 support 2001-04-04 19:29:48 +00:00
Eric Andersen
3f98040554 I said no new features till after the 0.51 release. Well, I lied. This is a
vi editor for busybox, contributed by Sterling Huxley <sterling@europa.com>.
It adds 22k to the busybox binary when enabled.  Quite impressive!
2001-04-04 17:31:15 +00:00