Ticket #1538: minorfix.patch

File minorfix.patch, 1.1 KB (added by bilbo, 15 years ago)

minor fix for the branch

  • src/filegui.c

    diff --git a/src/filegui.c b/src/filegui.c
    index 63d02eb..6c698bf 100644
    a b init_replace (FileOpContext *ctx, enum OperationMode mode) 
    610610    char buffer[BUF_SMALL]; 
    611611    const char *title; 
    612612 
     613    const char *stripped_name = strip_home_and_password (ui->replace_filename); 
     614 
    613615    if (mode == Foreground) 
    614616        title = _(" File exists "); 
    615617    else 
    init_replace (FileOpContext *ctx, enum OperationMode mode) 
    647649        rd_xlen = max (rd_xlen, l1 + l2 + 8); 
    648650        rd_xlen = max (rd_xlen, str_term_width1 (title) + 2); 
    649651 
     652        rd_xlen = max (rd_xlen, min(COLS, str_term_width1 (stripped_name) + 8)); 
     653 
    650654        /* Now place buttons */ 
    651655        l1 += 5;                /* start of first button in the row */ 
    652656        i = num; 
    init_replace (FileOpContext *ctx, enum OperationMode mode) 
    671675                    title, DLG_CENTER | DLG_REVERSE); 
    672676 
    673677    ADD_RD_LABEL (ui, 0, 
    674                   str_trunc (strip_home_and_password (ui->replace_filename), 
     678                  str_trunc (stripped_name, 
    675679                                rd_xlen - 8), 0); 
    676680    ADD_RD_LABEL (ui, 1, file_date (ui->s_stat->st_mtime), 
    677681                  (off_t) ui->s_stat->st_size);