[BACK]Return to search.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mg

Diff for /src/usr.bin/mg/search.c between version 1.46 and 1.47

version 1.46, 2017/08/06 04:39:45 version 1.47, 2018/07/11 12:21:37
Line 159 
Line 159 
 /*  /*
  * Incremental Search.   * Incremental Search.
  *      dir is used as the initial direction to search.   *      dir is used as the initial direction to search.
    *      ^M      exit from Isearch, set mark
  *      ^S      switch direction to forward   *      ^S      switch direction to forward
  *      ^R      switch direction to reverse   *      ^R      switch direction to reverse
  *      ^Q      quote next character (allows searching for ^N etc.)   *      ^Q      quote next character (allows searching for ^N etc.)
  *      <ESC>   exit from Isearch   *      <ESC>   exit from Isearch, set mark
  *      <DEL>   undoes last character typed. (tricky job to do this correctly).   *      <DEL>   undoes last character typed. (tricky job to do this correctly).
  *      other ^ exit search, don't set mark   *      other ^ exit search, don't set mark
  *      else    accumulate into search string   *      else    accumulate into search string
Line 213 
Line 214 
                          */                           */
                         if (ttwait(300) == FALSE)                          if (ttwait(300) == FALSE)
                                 ungetkey(c);                                  ungetkey(c);
                           /* FALLTHRU */
                   case CCHR('M'):
                         srch_lastdir = dir;                          srch_lastdir = dir;
                         curwp->w_markp = clp;                          curwp->w_markp = clp;
                         curwp->w_marko = cbo;                          curwp->w_marko = cbo;
Line 359 
Line 362 
                 case CCHR('\\'):                  case CCHR('\\'):
                 case CCHR('Q'):                  case CCHR('Q'):
                         c = (char)getkey(FALSE);                          c = (char)getkey(FALSE);
                         goto addchar;  
                 case CCHR('M'):  
                         c = CCHR('J');  
                         goto addchar;                          goto addchar;
                 default:                  default:
                         if (ISCTRL(c)) {                          if (ISCTRL(c)) {

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.47