Merge branch '2653_input_password_fix'

* 2653_input_password_fix:
  Ticket #2653 (fixed: input password)
This commit is contained in:
Ilia Maslakov 2011-11-03 16:51:25 +04:00
commit d8f85ef24d

View File

@ -1276,13 +1276,13 @@ input_update (WInput * in, gboolean clear_first)
else else
{ {
cp = str_term_substring (in->buffer, in->term_first_shown, in->field_width - has_history); cp = str_term_substring (in->buffer, in->term_first_shown, in->field_width - has_history);
tty_setcolor (in->color[WINPUTC_MAIN]);
for (i = 0; i < in->field_width - has_history; i++) for (i = 0; i < in->field_width - has_history; i++)
{ {
if (i >= 0) if (i < (buf_len - in->term_first_shown) && cp[0] != '\0')
{ tty_print_char ('*');
tty_setcolor (in->color[WINPUTC_MAIN]); else
tty_print_char ((cp[0] != '\0') ? '*' : ' '); tty_print_char (' ');
}
if (cp[0] != '\0') if (cp[0] != '\0')
str_cnext_char (&cp); str_cnext_char (&cp);
} }