1

On some systems (Midnight Commander 4.8.1.4, Midnight Commander 4.8.3) the MC shows the full path of the opened file in the internal editor and on other systems (Midnight Commander 4.7.0.2, Midnight Commander 4.6.2-pre1) not. For example if you open /home/user/examplefilename.log, you will see "File: examplef~ame.log" instead of "/home/user/examplefilename.log" in the title row. Is this just version dependend or is it a preference? I can't find any option or documention how to change it to show the full path.

1 Answer 1

0

It's not a preference, but something that Midnight Commander decides based on how long the filename is, and how much space is available. You can see this in info.c:

 138     /* Print only lines which fit */
 139 
 140     if (i18n_adjust == 0)
 141     {
 142         /* This printf pattern string is used as a reference for size */
 143         file_label = _("File: %s");
 144         i18n_adjust = str_term_width1 (file_label) + 2;
 145     }

and later (the part that makes a shortened name with ~):

 264     case 3:
 265         {
 266             const char *fname;
 267 
 268             widget_move (w, 3, 2);
 269             fname = current_panel->dir.list[current_panel->selected].fname;
 270             str_printf (buff, file_label, str_trunc (fname, w->cols - i18n_adjust));
 271             tty_print_string (buff->str);
 272         }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.