(chdir_other_panel): use result of change_panel() instead of global
variable current_panel. (chdir_to_readlink): likewise.
(tree_chdir_sel): likewise.
(quick_view_cmd): mark that we don't use the result of change_panel().
(midnight_execute_cmd): likewise.
(panel_mouse_callback): likewise.
(tree_mouse_callback): likewise.
(mcview_mouse_callback): likewise.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Whitespaces (i.e. tabs and trailing spaces) are not consistent with
other parts of skin, they're bright on blue. Makes them green on black
background.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
'alacritty', 'tmux' and 'tmux-256color' all implement Shift+F<N> keys
in an xterm-compatible way. Without this change Shift+F<N> are handled
as F<N-2> key presses.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
On Linux >= 5.1, MC sometimes shows empty directpries on mounted CIFS
shares. Rereading directory restores the directory content.
(local_opendir): reopen directory, if first readdir() returns NULL and
errno == EINTR.
Signed-off-by: Andrij Abyzov <aabyzov@slb.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
In the function vfs_expire(), curr_time and exp_time are declared
guint64. curr_time is initialised with a timestamp and exp_time
with this timestamp minus vfs_timeout seconds. Later there is if
(stamping->time <= exp_time). Prior to commit
a94dd7d2de curr_time was initialised with
a value larger than vfs_timeout seconds, so everything was fine. This
commit changed the initialisation to a timer starting when mc is
started. So for the first vfs_timeout seconds, the result of the
subtraction is negative, but it is a guint64, so we just get a VERY
large unsigned value and the if (stamping->time <= exp_time) is always
true. So mc thinks the vfs hasn't been used recently and goes into an
infinite loop.
If one opens a .rpm file with mc and goes into the CONTENTS.cpio and
then tries to go into the .tar.gz there (this is the usual structure of
a .rpm) after waiting vfs_timeout seconds, everything is fine. However,
before vfs_timeout seconds, mc hangs.
Solution: use g_get_real_time() instead of mc_timer_elapsed().
Thanks nvwarr at hotmail.com for finding out the reason for this bug.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 4145_long_file_names:
WTree: get rid of file name limitation in quick search.
WPanel: get rid of file name limitation in quick search.
(mc_g_string_copy): new API that extends GString one.
(string_file_name): get rid of file name length limitation.
Ticket #4145: file names longer than 255 bytes are not supported.
Avoid limitation of file name length.
(vfs_dirent): redefined to use instead of standard "struct direct"
to hold file name of any length.
(vfs_class::readdir): return newly allocated vfs_dirent structure.
Related changes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This bug was introduced in 2e734e5618.
(dlg_handle_key): fallback to dialog_map if shortcut is not defined in
filemanager/editor/viewer/diffviewer key map.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This can be used for running a clipboard script (from a virtual terminal)
that autodetects (or requests from sytemctl) the proper values of DISPLAY
and XAUTHORITY without the need of exporting these variables to the whole
virtual terminal session.
(clipboard_file_to_ext_clip): don't test DISPLAY environment variable.
(clipboard_file_from_ext_clip): likewise.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>