aboutsummaryrefslogtreecommitdiff
path: root/editors/vi.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fix dependencies of FEATURE_GETOPT_LONGDenys Vlasenko2009-07-041-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* vi: do not accept uppercase comments (compat). Closes bug 397.Denys Vlasenko2009-06-151-33/+31
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* line editing: add an option to emit ESC [ 6 n and use resultsDenys Vlasenko2009-05-171-7/+6
| | | | | | | | | This makes line editing able to recognize case when cursor was not at the beginning of the line. It may also be adapted later to find out display size (serial line users would love it). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: mass renaming of USE_XXXX to IF_XXXXDenis Vlasenko2009-04-211-8/+8
| | | | | | and SKIP_XXXX to IF_NOT_XXXX - the second one was especially badly named. It was not skipping anything!
* trailing whitespace removalDenis Vlasenko2009-04-011-2/+2
|
* vi: speedup and code shrink (Walter Harms)Denis Vlasenko2008-11-241-21/+17
| | | | | | networking/interface.c: silence warning (Vladimir) wget: more robust EINTR detection
* vi: fix several instances of major goof: when text grows, text[]Denis Vlasenko2008-11-191-45/+78
| | | | | | | | | | | | | | | | might get reallocated! We were keeping around pointers to old place... function old new delta colon 3017 3037 +20 char_insert 336 354 +18 stupid_insert 18 24 +6 string_insert 89 94 +5 do_cmd 4461 4465 +4 file_insert 328 329 +1 text_hole_make 134 120 -14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 6/1 up/down: 54/-14) Total: 40 bytes
* *: code shrink by adding a wrapper around very common tcsetattr(0, TCSANOW, ↵Denis Vlasenko2008-11-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | xx) op function old new delta tcsetattr_stdin_TCSANOW - 14 +14 set_sane_term 116 113 -3 top_main 1277 1273 -4 make_new_session 421 415 -6 rawmode 133 126 -7 reset_term 18 10 -8 die 43 35 -8 cookmode 62 54 -8 vlock_main 425 415 -10 read_line_input 3165 3155 -10 bb_askpass 357 347 -10 fsck_minix_main 3079 3065 -14 getty_main 2375 2332 -43 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/12 up/down: 14/-131) Total: -117 bytes
* randomconfig fixesDenis Vlasenko2008-10-291-1/+2
|
* vi: fix uninitialized last_search_pattern (bug 5794)Denis Vlasenko2008-10-291-10/+5
|
* less: reuse former vi's key reading code. Improve SIGWINCH handling.Denis Vlasenko2008-10-251-1/+1
| | | | | | | | | | | | | | | function old new delta less_main 2056 2097 +41 getch_nowait 248 273 +25 read_key 310 321 +11 static.esccmds 61 69 +8 count_lines 72 74 +2 less_gets 166 142 -24 less_getch 172 43 -129 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 6/5 up/down: 91/-170) Total: -79 bytes text data bss dec hex filename
* vi: move key reading routine out of vi into llbbbDenis Vlasenko2008-10-251-185/+44
| | | | | | | | | | | function old new delta read_key - 310 +310 .... static.esccmds 170 61 -109 readit 286 60 -226 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 9/10 up/down: 349/-367) Total: -18 bytes
* vi: handle chars 0x80, 0x81... correctlyDenis Vlasenko2008-10-201-61/+64
|
* Comment and whitespace tweaks.Rob Landley2008-10-191-10/+6
|
* vi: explain why reading 4 chars is unsafeDenis Vlasenko2008-10-181-3/+5
|
* vi: whitespace fixDenis Vlasenko2008-10-181-2/+2
|
* vi: a few trivial optimizations to keyboard reading code; bump timeout to 50s.Denis Vlasenko2008-10-161-18/+29
| | | | | | | | | | function old new delta edit_file 901 912 +11 count_lines 74 72 -2 readit 306 289 -17 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 11/-19) Total: -8 bytes
* Confirmed that on Linux the serial interrupt takes precedence over the timerRob Landley2008-10-161-2/+3
| | | | | interrupt, so we don't need to worry about scheduler delays. This means the delay can be trimmed down to 25 miliseconds. Add comment while at it.
* vi: fix bizarre formatting. no code changesDenis Vlasenko2008-10-141-2/+2
|
* fix recurring "last_cmd overrun", fix [del] handling in insert modeDenis Vlasenko2008-10-141-15/+15
|
* vi: trivial size optimization -65 bytesDenis Vlasenko2008-10-141-18/+16
|
* vi: reinstate timeout of 300 msDenis Vlasenko2008-10-141-4/+8
|
* vi: add comments to Rob's algorithm of reading and matching ESC sequencesDenis Vlasenko2008-10-141-23/+33
| | | | | (nice work btw!)
* Escape sequences sent over serial links don't come in as a block, so pollRob Landley2008-10-141-1/+1
| | | | needs to pause a bit to make sure the next character has time to come in.
* Clean up editors/vi.c:readit() so it only does readahead when actuallyRob Landley2008-10-141-61/+58
| | | | | | parsing an escape sequence. (This mitigates but doesn't fully fix the the "cursoring around the file deletes data under qemu" bug, presumably due to "\033[D" being treated as three separate characters.)
* crontab: do not destroy STDIN_FILENO, editor may need it (crontab -e)Denis Vlasenko2008-09-211-23/+25
| | | | | | | | | | vi: deal with EOF/error on stdin and with input NULs function old new delta crontab_main 623 642 +19 edit_file 901 906 +5 readit 331 318 -13
* vi: using array data after it fell out of scope is stupid.Denis Vlasenko2008-07-171-6/+8
|
* *: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko2008-07-051-3/+3
|
* vi: fix vda's thinkoDenis Vlasenko2008-06-271-1/+1
|
* *: introduce and use FAST_FUNC: regparm on i386, otherwise no-onDenis Vlasenko2008-06-271-2/+2
| | | | | | | text data bss dec hex filename 808035 611 6868 815514 c719a busybox_old 804472 611 6868 811951 c63af busybox_unstripped
* print_flags: fix trivial thinkoDenis Vlasenko2008-06-261-2/+2
| | | | | vi: fix reversed checks for underflow
* vi: fix yet another vda's thinkoDenis Vlasenko2008-06-241-0/+1
|
* vi: fix obvious thinko'sDenis Vlasenko2008-06-221-5/+4
|
* vi: fix vda's breakage (by Cristian Ionescu-Idbohrn)Denis Vlasenko2008-06-221-5/+5
|
* vi: small code shrinkDenis Vlasenko2008-06-211-35/+24
| | | | | | | | | | function old new delta file_insert 328 329 +1 colon 3067 3064 -3 string_insert 93 89 -4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 1/-7) Total: -6 bytes
* vi: fix the bug where vi never grows the edit buffer.Denis Vlasenko2008-06-201-121/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vi: do G trick on it function old new delta place_cursor 264 276 +12 next_tabstop 22 34 +12 mycmp 44 52 +8 status_line 34 40 +6 yank_delete 89 92 +3 what_reg 34 37 +3 suspend_sig 63 66 +3 find_range 493 496 +3 redraw 104 106 +2 cont_sig 63 65 +2 Indicate_Error 59 61 +2 status_line_bold 71 72 +1 file_insert 327 328 +1 vi_setops 1 - -1 ... cmdcnt 4 - -4 chars_to_parse 4 - -4 ccol 4 - -4 dot_scroll 88 79 -9 stupid_insert 28 18 -10 winch_sig 102 91 -11 char_insert 353 336 -17 readit 354 336 -18 get_one_char 128 110 -18 init_text_buffer 171 152 -19 text_hole_delete 132 112 -20 edit_file 940 918 -22 get_input_line 198 168 -30 show_status_line 449 408 -41 colon 3112 3067 -45 vi_main 312 250 -62 refresh 1077 974 -103 do_cmd 4818 4483 -335 ------------------------------------------------------------------------------ (add/remove: 0/38 grow/shrink: 13/20 up/down: 58/-889) Total: -831 bytes text data bss dec hex filename 809566 612 7044 817222 c7846 busybox_old 808794 611 6924 816329 c74c9 busybox_unstripped text data bss dec hex filename 18888 1 122 19011 4a43 busybox.t8/editors/vi.o 18116 0 0 18116 46c4 busybox.t9/editors/vi.o
* - use STD*_FILENO some more. No object-code changesBernhard Reutner-Fischer2008-05-191-3/+3
|
* more -Wall warning fixes. -Wall is enabled now.Denis Vlasenko2008-05-181-2/+2
|
* more -Wall warning fixes from Cristian Ionescu-Idbohrn.Denis Vlasenko2008-05-131-1/+3
| | | | | | | | | | | | | This time it resulted in small code changes: function old new delta nexpr 820 828 +8 tail_main 1200 1202 +2 wrapf 166 167 +1 parse_mount_options 227 209 -18 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/1 up/down: 11/-18) Total: -7 bytes
* vi: do not truncate file to zero length. closes bug 2944.Denis Vlasenko2008-05-031-1/+6
| | | | | | function old new delta file_write 98 104 +6
* *: whitespace fixes, no code changesDenis Vlasenko2008-03-241-1/+1
|
* lpr: add more accurate commentsDenis Vlasenko2008-03-241-1/+1
| | | | | *: trailing whitespace removal
* remove alarm() calls which were functioning as a primitivePaul Fox2008-03-171-17/+3
| | | | | | | watchdog function, presumably to catch infinite loop bugs. (control-C can do the same thing, and the alarms were too short in any case.) also, switch to sigsetjmp/siglongjmp in order to allow repeated use of control-C -- otherwise it works once, then not again.
* *: add -Wunused-parameter; fix resulting breakageDenis Vlasenko2008-03-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta procps_scan 1265 1298 +33 aliascmd 278 283 +5 parse_file_cmd 116 120 +4 dname_enc 373 377 +4 setcmd 90 93 +3 execcmd 57 60 +3 count_lines 72 74 +2 process_command_subs 340 339 -1 test_main 409 407 -2 mknod_main 179 177 -2 handle_incoming_and_exit 2653 2651 -2 argstr 1312 1310 -2 shiftcmd 131 128 -3 exitcmd 46 43 -3 dotcmd 297 294 -3 breakcmd 86 83 -3 evalpipe 353 349 -4 evalcommand 1180 1176 -4 evalcmd 109 105 -4 send_tree 374 369 -5 mkfifo_main 82 77 -5 evalsubshell 152 147 -5 typecmd 75 69 -6 letcmd 61 55 -6 add_cmd 1190 1183 -7 main 891 883 -8 ash_main 1415 1407 -8 parse_stream 1377 1367 -10 alloc_procps_scan 55 - -55 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148) Total: -94 bytes text data bss dec hex filename 797195 658 7428 805281 c49a1 busybox_old 797101 658 7428 805187 c4943 busybox_unstripped
* fixups to vi usage, and move the initial redraw() past thePaul Fox2008-03-061-7/+9
| | | | | execution of commands supplied by -c or EXINIT, so their effect is displayed correctly.
* fixed the "dot" (i.e. '.') command, to properly re-init itsPaul Fox2008-03-061-58/+65
| | | | | | | | | | | | | | buffer between commands, not recalculate its length all the time, and to not reallocate its fixed-length buffer frequently. fixed the 'c', 'd', and 'y' commands to properly handle both motions that are just part of a line, and those that are multiline. for instance, now "c%" and "2cw" work correctly, whether the motions span lines or not. added some permissble motions for 'c', 'd', and 'y': namely 'h', 'l', SPACE, BS, and DEL
* fix vi's '?' and '/' commands to correctly set a new directionPaul Fox2008-03-051-1/+4
| | | | | when reusing a previous search pattern. previously only 'n' and 'N' reversed directions properly.
* *: add optimization barrier to all "G trick" locationsDenis Vlasenko2008-02-271-1/+1
|
* add ',' and 'gg' commands (patch from Leo Jay)Paul Fox2008-02-141-2/+27
|
* - spelling fixesBernhard Reutner-Fischer2008-02-111-4/+4
|