Commit Graph

15784 Commits

Author SHA1 Message Date
Anton Anikin
ae4553442f Ticket #4521: really escape fish shell history.
Some of the "service" commands generated by the mc "leak" into the fish
subshell history available to the user. An example to reproduce:

  *  set user shell to fish and start mc (SHELL=/usr/bin/fish mc)
  *  navigate to any directory
  *  press Ctrl+o
  *  press \u2191 button (UP, go back in history)
  *  observe " cd (printf '%b' ... " command

This commit avoids the " cd (printf '%b' ... " commands in the fish
history.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-02-11 19:19:40 +03:00
Andrew Borodin
a58e0a1d61 Merge branch '4525_mcedit_replace_regex'
* 4525_mcedit_replace_regex:
  (edit_search_init): call edit_search_fix_search_start_if_selection().
  Tickets #4525, #4526: mcedit: fix replacement using regular expressions.
2024-02-11 19:10:32 +03:00
Andrew Borodin
f87a6ae312 (edit_search_init): call edit_search_fix_search_start_if_selection().
* (edit_search): do not call edit_search_fix_search_start_if_selection()
  since it called in edit_search_init().
  * (edit_replace_cmd): likewise; join two ifs.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-02-11 19:09:16 +03:00
Andrew Borodin
40e773908c Tickets #4525, #4526: mcedit: fix replacement using regular expressions.
The bug was introduced in 21feb38a8d.

  * (edit_search_init): call edit_get_search_line_type().
  * (edit_search): do mot call edit_get_search_line_type() since it is
  called in edit_search_init().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-02-11 19:09:16 +03:00
Andrew Borodin
c1832fd586 Merge branch '4518_unrar7'
* 4518_unrar7:
  Ticket #4518: extfs: support unrar-7.
2024-01-30 21:55:03 +03:00
Andrew Borodin
b20c068e51 Ticket #4518: extfs: support unrar-7.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-01-30 21:54:45 +03:00
purdeaandrei
147f28ab24 Ticket #4519: mcedit: fix php.syntax.
Highlight comment located in any place of line, not from start only.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-01-28 11:29:39 +03:00
Yury V. Zaytsev
953c101347 Update doc/NEWS file
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2024-01-20 21:09:00 +01:00
Yury V. Zaytsev
adca552d80 Update hints translations from Transifex
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2024-01-20 21:04:28 +01:00
Yury V. Zaytsev
023f6c4d64 Update translations from Transifex
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2024-01-20 21:02:14 +01:00
Andrew Borodin
e850db370c Merge branch '4490_cleanup'
* 4490_cleanup: (31 commits)
  Update po/*.po files.
  ext.d/image.sh: use exiftool in addition to exif to view image metadata.
  ext.d/image.sh: check $DISPLAY in the xpm View action.
  mc.ext.ini: support avif images.
  mc.ext.ini: add View action for webp images.
  Update copyright years.
  (main): call tty_check_term() right after mc_args_parse().
  Refactor learn keys.
  Use g_string_new_take().
  (test_glob_prepare_replace_str): remove unneeded type cast.
  maint/utils/update-years.sh: replaced unportable 'sed -i' command.
  maint/utils/update-years.sh: add src/man2hlp/man2hlp.in.
  src/man2hlp/man2hlp.in: collapse copyright years.
  (str_utf8_offset_to_pos): change type of variable.
  (mc_search_regex__get_max_num_of_replace_tokens): refactor loop.
  lib/widget/input_complete.c: remove intermediate variables.
  mcedit: add intermediate variables to make code more readable and debuggable.
  (is_blank): refactor loop.
  (edit_help): use help node of editor dialog.
  (tree_execute_cmd): move CK_Help handler to separate function tree_help()
  ...
2024-01-14 18:30:28 +03:00
Andrew Borodin
5e5593e0b6 Update po/*.po files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-01-14 18:29:41 +03:00
Andrew Borodin
b03981f1f4 ext.d/image.sh: use exiftool in addition to exif to view image metadata.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-01-13 17:14:57 +03:00
Andrew Borodin
3a160902a1 ext.d/image.sh: check $DISPLAY in the xpm View action.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-01-13 16:13:51 +03:00
Eugene San
51b0b5fe7c mc.ext.ini: support avif images.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-01-13 15:38:40 +03:00
Eugene San
45cd77ffa5 mc.ext.ini: add View action for webp images.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-01-13 15:23:29 +03:00
Andrew Borodin
fe42478b97 Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-01-01 09:46:17 +03:00
Andrew Borodin
19d852dbd3 (main): call tty_check_term() right after mc_args_parse().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
07db4c4fa3 Refactor learn keys.
* (learn_store_key):
  * (learn_key): use GString for key buffer.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
2d86b8889f Use g_string_new_take().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
2019737846 (test_glob_prepare_replace_str): remove unneeded type cast.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
fea3a86faf maint/utils/update-years.sh: replaced unportable 'sed -i' command.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
2ce0b25cfd maint/utils/update-years.sh: add src/man2hlp/man2hlp.in.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
ded62f5f3e src/man2hlp/man2hlp.in: collapse copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
247d092217 (str_utf8_offset_to_pos): change type of variable.
GString is pointless here.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
2e33fd4fad (mc_search_regex__get_max_num_of_replace_tokens): refactor loop.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
85b1cec81e lib/widget/input_complete.c: remove intermediate variables.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
49bc0ddebf mcedit: add intermediate variables to make code more readable and debuggable.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
d8a93bcc86 (is_blank): refactor loop.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
1152a232fb (edit_help): use help node of editor dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
5567eb573d (tree_execute_cmd): move CK_Help handler to separate function tree_help()
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
94daff9071 (menubar_execute_cmd): move CK_Help handler to separate function menubar_help().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
20dd30ada3 (dlg_execute_cmd): move CK_Help handler to separate function dlg_help().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
57342e54f4 (mcview_execute_cmd): don't handle CK_Help here.
Use default handler via dlg_execute_cmd().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
8f9593d2d5 (move_to_top): fix a 14-years error in condition.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
8cebe41b9a src/help.c: reduce variable scopes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
22131dbd71 src/help.c: refactor loops.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
f8c0adec73 src/help.c: fix coding style.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
d450911558 doc/ru/mc.1: various fixups.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:36 +03:00
Andrew Borodin
7feb865c88 (eval_marks): move from editcmd.c to edit.c.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:27:24 +03:00
Andrew Borodin
e2e34d82ab (edit_block_delete_cmd): return boolean.
(edit_block_delete): likewize.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:27:24 +03:00
Andrew Borodin
f29c5a35f7 Ticket #4490: code cleanup before 4.8.31 release.
(mcdiffview_dialog_search): indentation.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:27:24 +03:00
Andrew Borodin
6abea9976b Merge branch '3761_mcedit_delete_vertical_block'
* 3761_mcedit_delete_vertical_block:
  Tricket #3761: mcedit: wrong deletion of marked column.
2023-12-31 19:21:10 +03:00
Andrew Borodin
b50470f067 Tricket #3761: mcedit: wrong deletion of marked column.
If mark column (Shitf+F3) and select the column from left to right, from
up to down, it can be properly deleted later with F8.
But if select it from right to left, from up to down, erasing with F8
keeps the first line of the selected block.

Solution: don't call eval_marks() several times while deleting vertical
block.

  * (edit_block_delete_cmd): calculate mark positions here and pass them...
  * (edit_block_delete): ...through here...
  * (edit_delete_column_of_text): ...to here.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:19:50 +03:00
Andrew Borodin
15419524e8 Merge branch '4433_edit_nonprintable_color'
* 4433_edit_nonprintable_color:
  Ticket #4433: skins: add color for non-printable characters in editor.
2023-12-10 17:49:13 +03:00
Andrew Borodin
1b3684e0e1 Ticket #4433: skins: add color for non-printable characters in editor.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-10 17:47:07 +03:00
Andrew Borodin
ea6bd1866e Merge branch '4324_s3_python3'
* 4324_s3_python3:
  Ticket 4324: EXTFS: s3+: port to Python3.
2023-12-10 17:43:04 +03:00
Balló György
b750e70920 Ticket 4324: EXTFS: s3+: port to Python3.
Closes MidnightCommander/mc#149.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-10 17:42:41 +03:00
Andrew Borodin
95958bce85 (extfs_cmd): fix build of extfs command if localname is empty.
Fix d4e59aa022.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-04 21:00:53 +03:00
Andrew Borodin
f2166c264c Merge branch '4511_uc1541'
* 4511_uc1541:
  Ticket #4511: update uc1541 unit of EXTFS VFS.
2023-12-01 19:59:47 +03:00