Lines Matching refs:mode

177 #define	CONTROL	-20			/* control mode */
180 #define INPUT -30 /* input mode */
181 #define INSERT -35 /* insert mode */
347 /*** Set raw mode ***/
508 /* so set raw mode */
635 /*{ APPEND( char, mode )
638 * mode = APPEND, shift chars right before appending
643 static void append(Vi_t *vp,int c, int mode)
649 if( mode==APPEND || (cur_virt==last_virt && last_virt>=0))
742 /* return to APPEND/REPLACE mode */
792 default: /** input mode **/
1093 /*{ DELETE( nchars, mode )
1098 * If mode = 'c', do not save the characters deleted
1104 static void cdelete(Vi_t *vp,register int nchars, int mode)
1126 if( mode != 'c' )
1136 if( mode != 'y' )
1145 /*{ DEL_LINE( mode )
1148 * mode = GOOD, do a save_v()
1151 static void del_line(register Vi_t *vp, int mode)
1156 if( mode == GOOD )
1179 /*{ DELMOTION( motion, mode )
1183 * mode = 'd', save deleted characters, delete
1191 static int delmotion(Vi_t *vp,int motion, int mode)
1198 if( mode != 'y' )
1211 if( mode=='c' && end>begin && strchr("wW", motion) )
1233 cdelete(vp,delta, mode);
1234 if( mode == 'y' )
1346 /*{ GETLINE( mode )
1349 * mode = APPEND, allow escape to cntlmode subroutine
1354 * = ESC, enter control mode immediately
1364 static void getline(register Vi_t* vp,register int mode)
1372 if( mode == ESC )
1374 /*** go directly to control mode ***/
1380 if( (c=ed_getchar(vp->ed,mode==SEARCH?1:-2)) == usreof )
1390 else if(mode==SEARCH && c==editb.e_intr)
1397 append(vp,c, mode);
1404 case ESC: /** enter control mode **/
1407 append(vp,c, mode);
1410 if( mode == SEARCH )
1418 if( mode == REPLACE )
1440 mode = APPEND;
1443 mode = tmp;
1444 if(mode==REPLACE)
1466 append(vp,usrerase, mode);
1470 if( mode==SEARCH && cur_virt==0 )
1476 if(mode==REPLACE || (last_save>0 && last_virt<=last_save))
1480 else if(mode==REPLACE)
1482 mode = REPLACE;
1511 append(vp,usrkill, mode);
1515 if( mode == SEARCH )
1537 if( mode != SEARCH )
1544 if(mode!=SEARCH && last_virt>=0 && (vp->ed->e_tabcount|| !isblank(cur_virt)) && vp->ed->sh->nextprompt)
1561 if( mode == REPLACE )
1571 mode = APPEND;
1574 append(vp,c, mode);
1837 /*{ REFRESH( mode )
1842 * mode = CONTROL, refresh in control mode, ie. leave cursor
1844 * = INPUT, refresh in input mode; leave cursor positioned
1866 static void refresh(register Vi_t* vp, int mode)
1885 mode = TRANSLATE;
1889 if(mode==INPUT && v>0 && virtual[0]=='#' && virtual[v]!='*')
1910 else if(mode==INPUT && v<=1 && vp->ed->hlist)
1943 if( mode == TRANSLATE )
2047 if( mode==INPUT && cur_virt>INVALID )
2180 /*{ SEARCH( mode )
2184 * mode = '/' require search string and search new to old
2185 * mode = '?' require search string and search old to new
2186 * mode = 'N' repeat last search in reverse direction
2187 * mode = 'n' repeat last search
2212 static int search(register Vi_t* vp,register int mode)
2219 if( vp->direction == -2 && mode != 'n')
2221 if( mode == '/' || mode == '?')
2225 append(vp,mode, APPEND);
2231 vp->direction = mode=='/' ? -1 : 1;
2240 if( cur_virt==0 || fold(mode)=='N' )
2251 if( mode == 'N' )
2263 if(mode=='?' && (i=curline_search(vp,((char*)virtual)+1))>=0)
2375 /*{ TEXTMOD( command, mode )
2379 * mode != 0, repeat previous operation
2383 static int textmod(register Vi_t *vp,register int c, int mode)
2390 if(mode && (fold(vp->lastmotion)=='F' || fold(vp->lastmotion)=='T'))
2417 mode = cur_virt-1;
2443 if(c=='=' || (mode<cur_virt && (virtual[cur_virt]==' ' || virtual[cur_virt]=='/')))
2450 if( mode )
2497 if( fold(mode) == 'A' )
2516 if( fold(mode) == 'I' )
2534 if( mode )
2549 if( mode == 'c' )
2563 if( mode )
2595 if( mode != 's' && mode != 'c' )
2604 if( mode == 'R' )
2605 mode = REPLACE;
2607 mode = APPEND;
2612 append(vp,c,mode);
2618 if( mode == 'R' )
2629 if( mode )
2647 if( mode )
2661 if( mode )