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 */
631 /*{ APPEND( char, mode )
634 * mode = APPEND, shift chars right before appending
639 static void append(Vi_t *vp,int c, int mode)
645 if( mode==APPEND || (cur_virt==last_virt && last_virt>=0))
738 /* return to APPEND/REPLACE mode */
788 default: /** input mode **/
1043 /*{ DELETE( nchars, mode )
1048 * If mode = 'c', do not save the characters deleted
1054 static void cdelete(Vi_t *vp,register int nchars, int mode)
1076 if( mode != 'c' )
1086 if( mode != 'y' )
1095 /*{ DEL_LINE( mode )
1098 * mode = GOOD, do a save_v()
1101 static void del_line(register Vi_t *vp, int mode)
1106 if( mode == GOOD )
1129 /*{ DELMOTION( motion, mode )
1133 * mode = 'd', save deleted characters, delete
1141 static int delmotion(Vi_t *vp,int motion, int mode)
1148 if( mode != 'y' )
1161 if( mode=='c' && end>begin && strchr("wW", motion) )
1183 cdelete(vp,delta, mode);
1184 if( mode == 'y' )
1296 /*{ GETLINE( mode )
1299 * mode = APPEND, allow escape to cntlmode subroutine
1304 * = ESC, enter control mode immediately
1314 static void getline(register Vi_t* vp,register int mode)
1323 if( mode == ESC )
1325 /*** go directly to control mode ***/
1331 if( (c=ed_getchar(vp->ed,mode==SEARCH?1:-2)) == usreof )
1346 append(vp,c, mode);
1353 case ESC: /** enter control mode **/
1356 append(vp,c, mode);
1359 if( mode == SEARCH )
1367 if( mode == REPLACE )
1389 mode = APPEND;
1392 mode = tmp;
1393 if(mode==REPLACE)
1410 append(vp,usrerase, mode);
1414 if( mode==SEARCH && cur_virt==0 )
1420 if(mode==REPLACE || (last_save>0 && last_virt<=last_save))
1424 else if(mode==REPLACE)
1426 mode = REPLACE;
1455 append(vp,usrkill, mode);
1459 if( mode == SEARCH )
1481 if( mode != SEARCH )
1488 if(mode!=SEARCH && last_virt>=0 && (vp->ed->e_tabcount|| !isblank(cur_virt)) && vp->ed->sh->nextprompt)
1505 if( mode == REPLACE )
1515 mode = APPEND;
1518 append(vp,c, mode);
1777 /*{ REFRESH( mode )
1782 * mode = CONTROL, refresh in control mode, ie. leave cursor
1784 * = INPUT, refresh in input mode; leave cursor positioned
1806 static void refresh(register Vi_t* vp, int mode)
1825 mode = TRANSLATE;
1858 if( mode == TRANSLATE )
1962 if( mode==INPUT && cur_virt>INVALID )
2095 /*{ SEARCH( mode )
2099 * mode = '/' require search string and search new to old
2100 * mode = '?' require search string and search old to new
2101 * mode = 'N' repeat last search in reverse direction
2102 * mode = 'n' repeat last search
2127 static int search(register Vi_t* vp,register int mode)
2134 if( vp->direction == -2 && mode != 'n')
2136 if( mode == '/' || mode == '?')
2140 append(vp,mode, APPEND);
2146 vp->direction = mode=='/' ? -1 : 1;
2155 if( cur_virt==0 || fold(mode)=='N' )
2166 if( mode == 'N' )
2178 if(mode=='?' && (i=curline_search(vp,((char*)virtual)+1))>=0)
2290 /*{ TEXTMOD( command, mode )
2294 * mode != 0, repeat previous operation
2298 static int textmod(register Vi_t *vp,register int c, int mode)
2305 if(mode && (fold(vp->lastmotion)=='F' || fold(vp->lastmotion)=='T'))
2332 mode = cur_virt-1;
2358 if(c=='=' || (mode<cur_virt && (virtual[cur_virt]==' ' || virtual[cur_virt]=='/')))
2365 if( mode )
2412 if( fold(mode) == 'A' )
2431 if( fold(mode) == 'I' )
2449 if( mode )
2464 if( mode == 'c' )
2478 if( mode )
2510 if( mode != 's' && mode != 'c' )
2519 if( mode == 'R' )
2520 mode = REPLACE;
2522 mode = APPEND;
2527 append(vp,c,mode);
2533 if( mode == 'R' )
2544 if( mode )
2562 if( mode )
2576 if( mode )