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

Diff for /src/usr.bin/less/cmdbuf.c between version 1.16 and 1.17

version 1.16, 2016/09/17 15:06:41 version 1.17, 2019/05/15 18:06:09
Line 117 
Line 117 
 }  }
   
 /*  /*
  * Display a string, usually as a prompt for input into the command buffer.   * Display an ASCII string, usually as a prompt for input,
    * into the command buffer.
  */   */
 void  void
 cmd_putstr(char *s)  cmd_putstr(char *s)
 {  {
         LWCHAR prev_ch = 0;  
         LWCHAR ch;  
         char *endline = s + strlen(s);  
         while (*s != '\0') {          while (*s != '\0') {
                 char *ns = s;                  putchr(*s++);
                 ch = step_char(&ns, +1, endline);                  cmd_col++;
                 while (s < ns)                  prompt_col++;
                         putchr(*s++);  
                 if (!utf_mode) {  
                         cmd_col++;  
                         prompt_col++;  
                 } else if (!is_composing_char(ch) &&  
                     !is_combining_char(prev_ch, ch)) {  
                         int width = is_wide_char(ch) ? 2 : 1;  
                         cmd_col += width;  
                         prompt_col += width;  
                 }  
                 prev_ch = ch;  
         }          }
 }  }
   

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17