Commit Graph

15819 Commits

Author SHA1 Message Date
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
Roman 'gryf' Dobosz
9aa5974fdc Ticket #4511: update uc1541 unit of EXTFS VFS.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-28 21:08:28 +03:00
Andrew Borodin
cede013095 Merge branch '4509_lzo'
* 4509_lzo:
  Ticket #4509: support for lzo/lzop compression format.
2023-11-26 17:28:03 +03:00
TobiasW
f78f9b2eda Ticket #4509: support for lzo/lzop compression format.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-26 17:27:11 +03:00
Andrew Borodin
1d5931a90d Merge branch '4490_cleanup'
* 4490_cleanup: (46 commits)
  Update po/*.po files.
  (mc_config_history_save): remove check because condition is always true here.
  (mc_config_history_get_recent_item): new API.
  Fix comments of history and panels.ini files location.
  lib/mcconfig/history.c: fix comments.
  src/editor/edit.c: fix coding style.
  (edit_insert_file): change variable type from int to gboolean.
  (edit_user_menu): avoid inverse logic.
  mcedit: rename user_menu() to edit_user_menu().
  mcedit: minor optimization.
  (edit_cursor_to_eol): reduce variable scope.
  (edit_execute_cmd): refactor loop.
  (insert_spaces_tab): refactor loop.
  Refactoring: avoid create an empty strings.
  (expand_format): remove intermediate variable.
  (strip_ext): refactor loop.
  mc.ext.ini.in: support webp images.
  tar: type accuracy.
  (oldgnu_get_sparse_info) fix conditional-uninitialized warning.
  (edit_print_string): refactor loop.
  ...
2023-11-06 21:15:20 +03:00
Andrew Borodin
5ff8599d43 Update po/*.po files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-06 21:14:51 +03:00
Andrew Borodin
7459861f58 (mc_config_history_save): remove check because condition is always true here.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-06 21:06:15 +03:00
Andrew Borodin
a74d638155 (mc_config_history_get_recent_item): new API.
* (edit_search_cmd): use mc_config_history_get_recent_item().
  * (mcview_continue_search_cmd): likewise.

mc_config_history_get_recent_item() is not implemented optimally yet.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-06 21:06:15 +03:00
Andrew Borodin
018687b12f Fix comments of history and panels.ini files location.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-06 21:06:15 +03:00
Andrew Borodin
6b274f7034 lib/mcconfig/history.c: fix comments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-06 21:06:15 +03:00
Andrew Borodin
6735c4803a src/editor/edit.c: fix coding style.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-06 21:06:15 +03:00
Andrew Borodin
433f792b53 (edit_insert_file): change variable type from int to gboolean.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-06 21:06:15 +03:00
Andrew Borodin
719422746a (edit_user_menu): avoid inverse logic.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-06 21:06:15 +03:00
Andrew Borodin
6ad4f04626 mcedit: rename user_menu() to edit_user_menu().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-06 21:06:14 +03:00
Andrew Borodin
2949eabd33 mcedit: minor optimization.
* (edit_left_word_move): break the loop as fast as possible.
  * (edit_right_word_move): likewise.
  * (edit_left_delete_word): likewise.
  * (edit_right_delete_word): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-06 21:06:14 +03:00
Andrew Borodin
1fe2d902b8 (edit_cursor_to_eol): reduce variable scope.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-06 21:06:14 +03:00