aboutsummaryrefslogtreecommitdiff
path: root/editors/vi.c
diff options
context:
space:
mode:
Diffstat (limited to 'editors/vi.c')
-rw-r--r--editors/vi.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/editors/vi.c b/editors/vi.c
index 2e4f7fcb5..6ce513c0c 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -501,7 +501,7 @@ static char *prev_line(char *); // return pointer to prev line B-o-l
501static char *next_line(char *); // return pointer to next line B-o-l 501static char *next_line(char *); // return pointer to next line B-o-l
502static char *end_screen(void); // get pointer to last char on screen 502static char *end_screen(void); // get pointer to last char on screen
503static int count_lines(char *, char *); // count line from start to stop 503static int count_lines(char *, char *); // count line from start to stop
504static char *find_line(int); // find begining of line #li 504static char *find_line(int); // find beginning of line #li
505static char *move_to_col(char *, int); // move "p" to column l 505static char *move_to_col(char *, int); // move "p" to column l
506static void dot_left(void); // move dot left- dont leave line 506static void dot_left(void); // move dot left- dont leave line
507static void dot_right(void); // move dot right- dont leave line 507static void dot_right(void); // move dot right- dont leave line
@@ -1684,10 +1684,10 @@ static char *dollar_line(char *p) // return pointer to just before NL line
1684 1684
1685static char *prev_line(char *p) // return pointer first char prev line 1685static char *prev_line(char *p) // return pointer first char prev line
1686{ 1686{
1687 p = begin_line(p); // goto begining of cur line 1687 p = begin_line(p); // goto beginning of cur line
1688 if (p > text && p[-1] == '\n') 1688 if (p > text && p[-1] == '\n')
1689 p--; // step to prev line 1689 p--; // step to prev line
1690 p = begin_line(p); // goto begining of prev line 1690 p = begin_line(p); // goto beginning of prev line
1691 return p; 1691 return p;
1692} 1692}
1693 1693
@@ -1735,7 +1735,7 @@ static int count_lines(char *start, char *stop)
1735 return cnt; 1735 return cnt;
1736} 1736}
1737 1737
1738static char *find_line(int li) // find begining of line #li 1738static char *find_line(int li) // find beginning of line #li
1739{ 1739{
1740 char *q; 1740 char *q;
1741 1741
@@ -3357,7 +3357,7 @@ static void refresh(int full_screen)
3357 tp = t + 1; 3357 tp = t + 1;
3358 } 3358 }
3359 3359
3360 // see if there are any changes between vitual screen and out_buf 3360 // see if there are any changes between virtual screen and out_buf
3361 changed = FALSE; // assume no change 3361 changed = FALSE; // assume no change
3362 cs = 0; 3362 cs = 0;
3363 ce = columns - 1; 3363 ce = columns - 1;
@@ -3394,7 +3394,7 @@ static void refresh(int full_screen)
3394 if (cs < 0) cs = 0; 3394 if (cs < 0) cs = 0;
3395 if (ce > columns - 1) ce = columns - 1; 3395 if (ce > columns - 1) ce = columns - 1;
3396 if (cs > ce) { cs = 0; ce = columns - 1; } 3396 if (cs > ce) { cs = 0; ce = columns - 1; }
3397 // is there a change between vitual screen and out_buf 3397 // is there a change between virtual screen and out_buf
3398 if (changed) { 3398 if (changed) {
3399 // copy changed part of buffer to virtual screen 3399 // copy changed part of buffer to virtual screen
3400 memcpy(sp+cs, out_buf+cs, ce-cs+1); 3400 memcpy(sp+cs, out_buf+cs, ce-cs+1);
@@ -3844,7 +3844,7 @@ static void do_cmd(int c)
3844 } 3844 }
3845 break; 3845 break;
3846#endif /* FEATURE_VI_SEARCH */ 3846#endif /* FEATURE_VI_SEARCH */
3847 case '0': // 0- goto begining of line 3847 case '0': // 0- goto beginning of line
3848 case '1': // 1- 3848 case '1': // 1-
3849 case '2': // 2- 3849 case '2': // 2-
3850 case '3': // 3- 3850 case '3': // 3-