pwidth
static int pwidth; /* display columns needed for prompt */
cur_col = pwidth = promptlen(prompt, &p);
if (pwidth > x_cols - 3 - MIN_EDIT_SPACE) {
prompt_trunc = pwidth - cur_col;
pwidth -= prompt_trunc;
winwidth = x_cols - pwidth - 3;
cur_col = pwidth;
ncol = col + pwidth;
ncol = col + pwidth - 1;
ncol = col + pwidth;
col = pwidth;
if (col > pwidth)
ed_mov_opt(pwidth + winwidth + 1, wb1);
cur_col = pwidth;
ci = pwidth;
while (ci < col || (ci > pwidth && isu8cont(*wb))) {
if (ci == pwidth)
cmd_step_common(char *p, LWCHAR ch, int len, int *pwidth, int *bswidth)
if (pwidth != NULL || bswidth != NULL) {
if (pwidth != NULL)
*pwidth = prlen;
if (pwidth != NULL || bswidth != NULL) {
if (pwidth != NULL)
*pwidth = 0;
if (pwidth != NULL)
*pwidth = prlen;
if (pwidth != NULL)
*pwidth = is_wide_char(ch) ? 2 : 1;
cmd_step_right(char **pp, int *pwidth, int *bswidth)
return (cmd_step_common(p, ch, *pp - p, pwidth, bswidth));
cmd_step_left(char **pp, int *pwidth, int *bswidth)
return (cmd_step_common(*pp, ch, p - *pp, pwidth, bswidth));
width = pwidth(ch, attr[curr], prev_ch);
w = pwidth(ch, a, prev_ch);
if (column + to_tab - 1 + pwidth(' ', attr, 0) +
pwidth(' ', binattr, 0) + attr_ewidth(binattr) > sc_width)
pwidth(' ', binattr, 0) + attr_ewidth(binattr) > sc_width)
u_int pwidth, u_int *width, struct grid_cell *gc,
if (*width >= offset + pwidth)
if (*width > offset + pwidth)
struct screen_write_ctx *ctx, u_int offset, u_int pwidth, u_int *width,
return (status_prompt_redraw_character(ctx, offset, pwidth,
u_int pcursor, pwidth, promptline;
pwidth = utf8_strwidth(c->prompt_buffer, -1);
pwidth++;
pwidth = left;
if (pwidth > left)
pwidth = left;
pwidth, &width, &gc))
if (!status_prompt_redraw_character(&ctx, offset, pwidth,
status_prompt_redraw_quote(c, pcursor, &ctx, offset, pwidth, &width,