Commit Graph

16154 Commits

Author SHA1 Message Date
Andrew Borodin
57cf824a51 Merge branch '4540_mcedit_macro_deletes_text'
* 4540_mcedit_macro_deletes_text:
  Ticket #4540: mcedit: macro deletes text.
2024-05-25 19:25:34 +03:00
Sprite_tm
fdacad8bbb Ticket #4540: mcedit: macro deletes text.
(edit_user_menu): fix misinterpretation of return value of
edit_block_delete_cmd(). The bug was introduced in
e2e34d82ab.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-05-22 22:06:03 +03:00
Andrew Borodin
425938e460 Merge branch '4292_autocomplete_slashes'
* 4292_autocomplete_slashes:
  Ticket #4292: fix redundant back slashes for autocomplete.
2024-05-19 19:31:14 +03:00
Andrew Borodin
2ee620f74f Ticket #4292: fix redundant back slashes for autocomplete.
Steps to reproduce:

1. Create file owth a space in the name:
  touch "a b"
There should no other files with name begins with "a" in the directory.
2. Press Shift-F4 to open editor
3. Press Shift-F2 to display dialog window "Save as..."
4. Press Esc+Tab to fill an input line

Result:
a\ b will appear in the edit field.
If you attempt to save the file, the back slash will be in the filename.

Expected result:
no any extra back slashes in the file name.

Soution: escape only '?', '*', and '&' symbols as described in the
manual page (see a11995e12b).

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-05-19 19:30:07 +03:00
Andrew Borodin
49e2535c07 Merge branch '3570_xorriso_slow'
* 3570_xorriso_slow:
  extfs: add test data for the iso9660 extfs helper (xorriso part)
  extfs: modify the iso9660 extfs helper to support testing (xorriso part)
  Ticket #3570: reimplement xorriso part of iso9660 listing.
2024-05-18 19:47:31 +03:00
slowpeek
62915a38f1 extfs: add test data for the iso9660 extfs helper (xorriso part)
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-05-18 19:47:06 +03:00
slowpeek
094a140c26 extfs: modify the iso9660 extfs helper to support testing (xorriso part)
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-05-18 19:47:06 +03:00
slowpeek
bbcfda3c62 Ticket #3570: reimplement xorriso part of iso9660 listing.
When xorriso is installed, iso9660 listing was done with `xorriso .. -lsl ..`
per dir recursively. It was unbearably slow on iso images with lots of subdirs.
For example, it took my machine 2 minutes to open debian-12.5.0-amd64-DVD-1.iso
which contains 2627 dirs. This commit makes use of `xorriso .. -find / -exec
lsdl ..` instead to list the whole directory tree in a single pass.

Also, parsing of xorriso output has been reworked and as a result such
previously missing items became visible in the listing:
- symlinks
- the boot catalog file

Closes MidnightCommander/mc#196.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-05-18 19:47:06 +03:00
Andrew Borodin
794823b885 Merge branch '4535_tmpdir_name'
* 4535_tmpdir_name:
  Ticket #4535: change name of temporary drirectory.
2024-05-14 21:52:35 +03:00
Andrew Borodin
2fda4c6670 Ticket #4535: change name of temporary drirectory.
* (mc_tmpdir): use g_mkdtemp() to create temporary directory.
  Make it name unique to avoid conflicts with other software such as
  Distrobox container.
  * (main): temporary directory has unique name from now. Remove it at exit.
2024-05-13 21:48:35 +03:00
Eugene San (eugenesan)
ce571933c9 Ticket #4536: skins: add root variant of julia256 skin.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-05-09 09:53:15 +03:00
Eugene San (eugenesan)
09077ff3c1 skins: modarin256-thin.ini: fix typo.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-05-09 09:52:15 +03:00
Andrew Borodin
cfedd6598c Merge branch '4524_cleanup'
* 4524_cleanup: (40 commits)
  Update po/*.po files.
  (link_t): remove unused member linkcount.
  src/filemanager/file.c: fix comment.
  src/filemanager/file.c: rename structure: link -> link_t.
  (fetch_hosts): refactoring.
  hostname complition: refactoring: use GPtrArray.
  (load_codepages_list_from_file): use g_ptr_array_new_full().
  src/selcodepage.c: fix coding style.
  (tree_move): fix coding style.
  (info_show_info): don't create VFS path if EXT2 attributes aren't supported.
  file_op_context_t: remove op_preserve member.
  (shell_execute): fix coding style.
  (tar_seek_archive): improve diagnostic for truncated archive.
  Move OS-specific stuff from lib/global.h to lib/unixcompat.h.
  Merge lib/utilunix.h into lib/util.h.
  Merge lib/strescape.h into lib/strutil.h. Rename functions.
  Set the default IO size to 256KiB.
  (find_cmd): add intermediate variable to simplify formatting.
  mceditor: massive use of edit_arg_t as function argument.
  mceditor: new APIs.
  ...
2024-04-07 16:47:06 +03:00
Andrew Borodin
d7cd6456de Update po/*.po files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:44:43 +03:00
Andrew Borodin
2a45e3bcb0 (link_t): remove unused member linkcount.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:38:11 +03:00
Andrew Borodin
1dc0b325dc src/filemanager/file.c: fix comment.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:38:11 +03:00
Andrew Borodin
56c661e6f4 src/filemanager/file.c: rename structure: link -> link_t.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:38:11 +03:00
Andrew Borodin
e6ae50191b (fetch_hosts): refactoring.
Reduce variablle scope.
Refactor loops.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:38:11 +03:00
Andrew Borodin
4929248f30 hostname complition: refactoring: use GPtrArray. 2024-04-07 16:38:11 +03:00
Andrew Borodin
1c7da890bf (load_codepages_list_from_file): use g_ptr_array_new_full().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:38:11 +03:00
Andrew Borodin
372f6d0d0e src/selcodepage.c: fix coding style.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:38:11 +03:00
Andrew Borodin
44666f378a (tree_move): fix coding style.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:38:11 +03:00
Andrew Borodin
48c5428b0f (info_show_info): don't create VFS path if EXT2 attributes aren't supported.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:38:11 +03:00
Andrew Borodin
d201e9cdac file_op_context_t: remove op_preserve member.
(file_mask_dialog): use local variable instead.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:38:11 +03:00
Andrew Borodin
d6f6c29c0b (shell_execute): fix coding style.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:38:11 +03:00
Andrew Borodin
059cd9569f (tar_seek_archive): improve diagnostic for truncated archive.
If EOF has been read, don't attempt to seek past it.

Sync with GNU tar 21318f385627a30da5d92811dd80f70abbe80ee7.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:38:11 +03:00
Andrew Borodin
1bae2c678f Move OS-specific stuff from lib/global.h to lib/unixcompat.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:38:11 +03:00
Andrew Borodin
a2f65852e3 Merge lib/utilunix.h into lib/util.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:38:11 +03:00
Andrew Borodin
aa38245e85 Merge lib/strescape.h into lib/strutil.h. Rename functions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:38:11 +03:00
Andrew Borodin
933b111a5d Set the default IO size to 256KiB.
src/filemanager/ioblksize.h: Add updated test results and increase value
from 128KiB to 256KiB.

This was previously 128KiB and increasing to 256KiB was seen to increase
throughput by 10-20% when reading cached files on modern systems.

Sync with GNU coreutils fcfba90d0d27a1bacf2020bac4dbec74ed181028.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:38:11 +03:00
Andrew Borodin
93a4b2ab79 (find_cmd): add intermediate variable to simplify formatting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:38:11 +03:00
Andrew Borodin
258b52b2d1 mceditor: massive use of edit_arg_t as function argument.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:38:11 +03:00
Andrew Borodin
e79e76b72b mceditor: new APIs.
* (edit_arg_init): initialize edit_arg_t object.
  * (edit_arg_assign): Apply new values to edit_arg_t object members.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:06:16 +03:00
Andrew Borodin
54bdd0efbf mceditor: drop edit_stack_type. Use edit_arg_t instead.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:06:16 +03:00
Andrew Borodin
ac41da50ee (edit_get_file_name): move from editwidget.c to edit.c.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:06:16 +03:00
Andrew Borodin
dae33eb229 mceditor: refactoring.
* (mcedit_arg_t): rename to edit_arg_t and move to src/editor/edit.h.
  * (mcedit_arg_free): rename to edit_arg_free() and move to src/editor/edit.c.
  * (mcedit_arg_vpath_new): rename to edit_arg_vpath_new(), move to src/editor/edit.c
  and make public.
  * (mcedit_arg_new): rename to edit_arg_new(), move to src/editor/edit.c
  and make public.
  * src/editor/editwidget.c: sync with new editor APIs.
  * src/main.c: likewise.
  * src/args.c: likewise.
  * (mc_args_parse): show error in case of run MC as "mc -e" if MC is built
    without builtin editor.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:06:16 +03:00
Andrew Borodin
f9a2038991 textconf.c: features: fix capital letters.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:06:16 +03:00
Andrew Borodin
228166b73b (dview_init): move first run of redo_diff() to diff_view().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:06:16 +03:00
Andrew Borodin
eceab3900d (create_panel): reduce variable scope.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:06:16 +03:00
Andrew Borodin
fe47ac5b56 (mcview_new): use WRect to define a panel area.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:06:16 +03:00
Andrew Borodin
d16ca7a1f5 Modify WTree creation API.
* (tree_init): use WRect to define widget area.
 * (create_panel): sync with modified API.
 * (tree_box): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:06:16 +03:00
Andrew Borodin
46dde8697b (info_new): use WRect to define a panel area.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:06:16 +03:00
Andrew Borodin
be148a0578 Change the file list panel creation APIs.
* (panel_sized_empty_new): use WRect to define a panel area.
  * (panel_sized_with_dir_new): likewise.
  * (panel_sized_new): likewise.
  * (panel_empty_new): sync with modified API.
  * (panel_with_dir_new): likewise.
  * (panel_sized_with_dir_new): likewise.
  * (create_panel): likewise.
  * (restore_into_right_dir_panel): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:06:16 +03:00
Andrew Borodin
8bb12a40e6 (put_tagged): trivial refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:06:16 +03:00
Andrew Borodin
41fadeffe7 (check_panel_timestamp): constify arguments, simplify checks.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:06:16 +03:00
Andrew Borodin
9584973453 (mc_build_filenamev): refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:06:16 +03:00
Andrew Borodin
0c53039155 Don't create and install diff viewer man page if mc is built --without-diff-viewer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:05:48 +03:00
Andrew Borodin
3958e1e68f Don't create and install mcedit man page if mc is built --without-internal-edit.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:03:37 +03:00
Andrew Borodin
7af11660f8 Clean up irrelevant comments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:01:47 +03:00
Andrew Borodin
de4e6ca534 src/editor/editmenu.c: includes cleanup.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:01:47 +03:00