* 3205_eta: (29 commits)
Update po/*.po files.
doc: update EN and RU man pages.
Calculate pauses in file operations.
File copy/move: make ETA accurate.
(calc_copy_file_progress): clarify calculation of BPSes and ETAs.
(panel_operate): use intermediate variable for better indentation.
(copy_file_file): clarify handling of mc_open() errors.
(copy_file_file): fix handling of mc_open() error.
(calc_copy_file_progress): rename from copy_file_file_display_progress().
(file_progress_show_total): add 'tv_current' argument.
(file_progress_show_total): use 'copied_bytes' to show numeric value.
(file_progress_show_count): remove 'done' and 'total' arguments.
(erase_dir_iff_empty): remove 'count' argument.
(file_op_context_t): rename members.
(copy_file_file): reduce variable scope, change order of progress update.
(file_op_context_t): reorder members.
Move content of src/filemanager/fileopctx.[ch] to src/filemanager/filegui.[ch].
(file_op_total_context_t): remove. All members were moved to file_op_context_t.
(file_op_total_context_t): rename members.
(copy_file_file_display_progress): remove dead code.
...
* (progress_update_one): update total progress bytes counter. Update
progress info in the progress window only if file was processed
successfully. Don't check buttons here.
* (move_file_file): update progress info if file move wasn't aborted.
* (copy_file_file): update progress info if stat() or open() failed
(file size is unknown, but file counter shoud be updated). Modify
caclulation and display of byte counters.
* (panel_operate): simplify files processing loop. Remove action that
already done via operate_one_file() call.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* (file_op_context_t): new member transfer_start.
* (copy_file_file_display_progress): remove tv_transfer_start
argument, use ctx->transfer_start instead.
* (copy_file_file): sync with modified file_op_context_t and
copy_file_file_display_progress().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
If we can't reliably identify slow terminal, we should not implicitly disable
verbose mode, instead let user disable it manually by starting with the slow
terminal switch.
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
> If you are not using some other optimization option, consider using -Og (see
> Options That Control Optimization) with -g. With no -O option at all, some
> compiler passes that collect information useful for debugging do not run at
> all, so that -Og may result in a better debugging experience.
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
`AM_PROG_CC_C_O` is part of `AC_PROG_CC` since Automake 1.14, released in 2013
and we are almost in 2025 by now.
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Starting with bash 5.1, PROMPT_COMMAND can be an array. Detect this
case and append an entry to the array instead of appending to a string.
Testing for bash >= 5 is sufficient, because the @a operator exists in
5.0. We need eval on the "then" branch because bash 1.x cannot even
parse that line (it does not support arrays).
Bug: https://bugs.gentoo.org/930401
Suggested-by: kfm@plushkava.net
Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Add a new variable to let fish know that -- since the parent commit
-- we are running a version where fish can use the kitty keyboard
protocol without breaking mc.
In a few years, both fish and mc should ideally remove this hack
(and fish should speak the kitty keyboard protocol unconditionally),
so no one should rely on this new variable except as a temporary
workaround. Hence the feature-specific flag and not a generic version
variable.
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
If a subshell (like fish 4.0) wishes to use "Disambiguate control keys"
from https://sw.kovidgoyal.net/kitty/keyboard-protocol/, ctrl-o sends
a multi-byte sequence. Let's make sure we can intercept that too so
we can suspend the shell.
Note that the shell already disables "Disambiguate control keys"
while it's suspended, so no other changes should be necessary.
Unfortunately there is one bug left: when I start "SHELL=$(which
fish) mc" and type `ctrl-o`, fish does not recognize CSI u bindings
(such as `bind ctrl-2 'echo hello'`) yet. It only works after the
second prompt. I haven't had time to figure that out.
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>