while (padsize--) addch((unsigned char)edit->pad);
if (padsize) { TmpStyleOn(prompting ? s_prompt_edit_pad : s_aedit_pad); while (padsize--) LYaddch(UCH(edit->pad)); TmpStyleOff(prompting ? s_prompt_edit_pad : s_aedit_pad); }
PUBLIC void LYRefreshEdit ARGS1(	EDREC *,	edit){    int i;    int length;    int nrdisplayed;    int padsize;    char *str;    char buffer[3];    buffer[0] = buffer[1] = buffer[2] = '\0';    if (!edit->dirty || (DspWdth == 0))	return;    edit->dirty = FALSE;    length=strlen(&Buf[0]);    edit->strlen = length;/* *  Now we have: *                .--DspWdth---. *      +---------+=============+-----------+ *      |         |M           M|           |   (M=margin) *      +---------+=============+-----------+ *      0         DspStart                   length * *  Insertion point can be anywhere between 0 and stringlength. *  Figure out new display starting point. * *   The first "if" below makes Lynx scroll several columns at a time when *   extending the string.  Looks awful, but that way we can keep up with *   data entry at low baudrates. */    if ((DspStart + DspWdth) <= length)	if (Pos >= (DspStart + DspWdth) - Margin)	    DspStart=(Pos - DspWdth) + Margin;    if (Pos < DspStart + Margin) {	DspStart = Pos - Margin;	if (DspStart < 0)	    DspStart = 0;    }    str = &Buf[DspStart];    nrdisplayed = length-DspStart;    if (nrdisplayed > DspWdth)	nrdisplayed = DspWdth;    move(edit->sy, edit->sx);#ifdef USE_COLOR_STYLE    /*     *  If this is the last screen line, set attributes to normal,     *  should only be needed for color styles.  The curses function     *  may be used directly to avoid complications. - kw     */    if (edit->sy == (LYlines - 1)) {	if (s_normal != NOSTYLE) {	    curses_style(s_normal, ABS_ON);	} else {	    attrset(A_NORMAL);	/* need to do something about colors? */	}    }#endif    if (edit->hidden) {	for (i = 0; i < nrdisplayed; i++)	    addch('*');    } else {	for (i = 0; i < nrdisplayed; i++)	    if ((buffer[0] = str[i]) == 1 || buffer[0] == 2 ||		((unsigned char)buffer[0] == 160 &&		 !(HTPassHighCtrlRaw || HTCJK != NOCJK ||		   (LYCharSet_UC[current_char_set].enc != UCT_ENC_8859 &&		    !(LYCharSet_UC[current_char_set].like8859		      & UCT_R_8859SPECL))))) {		addch(' ');	    } else {		/* For CJK strings, by Masanobu Kimura */		if (HTCJK != NOCJK && !isascii(buffer[0])) {		    if (i < (nrdisplayed - 1))			buffer[1] = str[++i];		    addstr(buffer);		    buffer[1] = '\0';		} else {		    addstr(buffer);		}	    }    }    /*     *	Erase rest of input area.     */    padsize = DspWdth-nrdisplayed;    while (padsize--)	addch((unsigned char)edit->pad);    /*     *	Scrolling indicators.     */    if (edit->panon) {	if ((DspStart + nrdisplayed) < length) {	    move(edit->sy, edit->sx+nrdisplayed-1);	    addch('}');	}	if (DspStart) {	    move(edit->sy, edit->sx);	    addch('{');	}    }    move(edit->sy, edit->sx + Pos - DspStart);    refresh();}