question about busybox vi..

Bob Winslow Bob.Winslow at sevis.com
Fri Sep 2 21:27:47 UTC 2005



[applause] ok, yes I have finally upgraded from 1.0-rc3 to the latest 1.01.   anyways..


I am seeing some vi weirdness in the 1.01 version which I was not seeing
the rc3 version.  It looks like the status line from the bottom of the window 
is painting in other areas beside the bottom.  (it doesn't seem to actually edit into
the file.. just showing up on screen)  repaint issues?

Is anyone else seeing something like this????  seems to happen when I
search from something deep in the file and page up/down in the file.

the changelog mentions some bug fixes for vi   -- specifically the status line I think.





[ busybox-1.01]$ diff editors/vi.c ../busybox-1.00-rc3/editors/vi.c
22c22
<       "$Id: vi.c,v 1.38 2004/08/19 19:15:06 andersen Exp $";
---
>       "$Id: vi.c,v 1.35 2004/03/31 11:12:51 andersen Exp $";
347d346
<       *status_buffer = '\0';  // clear status buffer
465a465
>       edit_status();
509d508
<       edit_status();
510a510
>       fflush(stdout);
679c679
<       int useforce = FALSE, forced = FALSE;
---
>       int useforce, forced;
695a696
>       forced = useforce = FALSE;
875d875
<                       show_status_line();
1338,1339d1337
<       edit_status();                  // show current file status
<       show_status_line();
1346,1347d1343
<       edit_status();                  // show current file status
<       show_status_line();
1353,1354d1348
<       edit_status();                  // show current file status
<       show_status_line();
1360,1361d1353
<       edit_status();                  // show current file status
<       show_status_line();
1386,1387d1377
<       edit_status();                  // show current file status
<       show_status_line();
1393,1394d1382
<       edit_status();                  // show current file status
<       show_status_line();
1419,1420d1406
<       edit_status();                  // show current file status
<       show_status_line();
1611c1597
<               *status_buffer = '\0';  // clear the status buffer
---
>               strcpy((char *) status_buffer, " ");    // clear the status buffer
1615c1601
<       } else if (c == erase_char || c == 8 || c == 127) { // Is this a BS
---
>       } else if (c == erase_char) {   // Is this a BS
2359c2345
< static Byte get_one_char(void)
---
> static Byte get_one_char()
2619c2605
< static void clear_to_eol(void)
---
> static void clear_to_eol()
2625c2611
< static void clear_to_eos(void)
---
> static void clear_to_eos()
2631c2617
< static void standout_start(void) // send "start reverse video" sequence
---
> static void standout_start() // send "start reverse video" sequence
2637c2623
< static void standout_end(void) // send "end reverse video" sequence
---
> static void standout_end() // send "end reverse video" sequence
2667c2653
< static void screen_erase(void)
---
> static void screen_erase()
2678d2663
<       //edit_status();
2689d2673
<       fflush(stdout);
2700c2684,2685
<       vsprintf((char *) status_buffer + strlen((char *) status_buffer), format, args);
---
>       vsprintf((char *) status_buffer + strlen((char *) status_buffer), format,
>                        args);
2703d2687
<       show_status_line();
2716d2699
<       show_status_line();
2743,2745c2726
<
<       sprintf((char *) status_buffer,
<                       "\"%s\""
---
>       psb("\"%s\""
2747c2728
<                       "%s"
---
>               "%s"
2749,2750c2730,2731
<                       "%s line %d of %d --%d%%--",
<                       (cfn != 0 ? (char *) cfn : "No file"),
---
>               "%s line %d of %d --%d%%--",
>               (cfn != 0 ? (char *) cfn : "No file"),
2752c2733
<                       ((vi_readonly || readonly) ? " [Read only]" : ""),
---
>               ((vi_readonly || readonly) ? " [Read only]" : ""),
2754,2755c2735,2736
<                       (file_modified ? " [modified]" : ""),
<                       cur, tot, percent);
---
>               (file_modified ? " [modified]" : ""),
>               cur, tot, percent);
2901,2902d2881
<                       edit_status();                  // show current file status
<                       show_status_line();
3082d3060
<               show_status_line();
3086,3087c3064,3065
<       case 8:         // ctrl-H- move left    (This may be ERASE char)
<       case 127:       // DEL- move left   (This may be ERASE char)
---
>       case 8:                 // ctrl-H- move left    (This may be ERASE char)
>       case 127:                       // DEL- move left   (This may be ERASE char)
3092,3093d3069
<               edit_status();                  // show current file status
<               show_status_line();
3252c3228
<               //**** fall thru to ... ';'
---
>               //**** fall thru to ... 'i'
3410d3385
<                       show_status_line();
3520d3494
<                       file_modified = TRUE;
[ busybox-1.01]$





More information about the busybox mailing list