Commit Graph

15159 Commits

Author SHA1 Message Date
Andrew Borodin
4a3cf4c6af Ticket #4132: clarify width of 'Find declaration' dialog.
Initial changeset:
src/editor/etags.[ch]: fix coding style.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-13 20:35:56 +03:00
Andrew Borodin
26e568cd7e Merge branch '4203_custom_zshrc'
* 4203_custom_zshrc:
  Ticket #4203: support custom .zshrc.
2021-03-13 20:19:48 +03:00
Andrew Borodin
76847e08fd Ticket #4203: support custom .zshrc.
Custom .zshrc file is  ~/.local/share/mc/.zshrc.

If ZDOTDIR environment variable is not set, set it to ~/.local/share/mc
if a .zshrc is found there. It is the only way to point zsh to an other
rc file than the default.

Thanks Sebastian Gniazdowski <sgniazdowski@gmail.com> for the original
patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-13 20:17:31 +03:00
Purdea Andrei
e50a4d0e25 Ticket# 4215: support syntax highlighting for Verilog/SystemVerilog header files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-13 08:12:43 +03:00
Andrew Borodin
94588d2da6 Merge branch '4207_tag_declaration'
* 4207_tag_declaration:
  Ticket # 4207: (editcmd_dialog_select_definition_show): fix "Find declaration" disrupting file's path.
2021-02-28 16:51:54 +03:00
Sebastian Gniazdowski
360e9bec33 Ticket # 4207: (editcmd_dialog_select_definition_show): fix "Find declaration" disrupting file's path.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-02-28 16:50:39 +03:00
Andrew Borodin
c9cf22d458 Merge branch '4180_file_S'
* 4180_file_S:
  Ticket #4180: fix zip handling.
2021-02-28 16:41:32 +03:00
Andrew Borodin
1ed638d66c Ticket #4180: fix zip handling.
After 8857423e4e zip archives opened with
an error:

    file -L -z archive.zip: Bad system call

This caused by using /usr/bin/file with -z option, because seccomp (a
security sandbox) doesn't allow it..

Solution: use -S option together with -z one.

The file command accepts the -S option since 5.33.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-02-28 16:39:21 +03:00
Andrew Borodin
b6de6e8f2d Merge branch '3682_drop_automatic_config_migration'
* 3682_drop_automatic_config_migration:
  Ticket #3682: drop automatic migration of configuration
2021-02-22 21:18:25 +03:00
Andrew Borodin
285eb5c186 Ticket #3682: drop automatic migration of configuration
...from ~/.mc to XDG-base.

Now MC ignores ~/.mc directory and uses XDG-based only.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-02-22 21:16:52 +03:00
Andrew Borodin
c580c4bad6 Merge branch '2020_find_follow_symlinks'
* 2020_find_follow_symlinks:
  Ticket #2020: filemanager/find.c: implement "Follow symlinks" option.
2021-02-22 21:11:40 +03:00
Paul Sokolovsky
1d1dba440d Ticket #2020: filemanager/find.c: implement "Follow symlinks" option.
Add "Follow symlinks" checkbox. Default state is off (following
current hardcoded behavior).

Signed-off-by: Paul Sokolovsky <pfalcon@users.sourceforge.net>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-02-22 21:09:17 +03:00
Andrew Borodin
4ae6cdb774 Ticket #4167: use mediainfo to view info about various media files.
Thanks korrado <anyhow2@mail.ru> for the issue.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-02-19 16:57:01 +03:00
Andrew Borodin
887bd8fe86 Ticket #4167: clarify e-books support.
mc.ext: add fb2 support.
ext.f/doc.sh.in: change key name for e-books.

Thanks korrado <anyhow2@mail.ru> for the issue.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-02-19 16:53:11 +03:00
Witold Baryluk
b01fea54a7 Ticket #4140: update python.syntax.
Add nonlocal, async, await keywoards.

nonlocal: added in Python 3.0 in 2006:

https://docs.python.org/3.0/whatsnew/3.0.html
https://www.python.org/dev/peps/pep-3104/
https://docs.python.org/3/reference/simple_stmts.html#the-nonlocal-statement

async, await: added in Python 3.5 in 2015:

https://docs.python.org/3.5/whatsnew/3.5.html#what-s-new-in-python-3-5
https://www.python.org/downloads/release/python-350/
https://www.python.org/dev/peps/pep-0492/
https://docs.python.org/3/reference/compound_stmts.html#async-def
https://docs.python.org/3/reference/compound_stmts.html#the-async-for-statement
https://docs.python.org/3/reference/compound_stmts.html#the-async-with-statement
https://docs.python.org/3/reference/expressions.html#await-expression
https://docs.python.org/3/glossary.html#term-coroutine
https://docs.python.org/3/library/asyncio-task.html
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-02-19 16:26:46 +03:00
Marek Černocký
c8649068d3 Ticket #4194: add .c++ and .h++ extensions for highlight.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-02-18 16:52:21 +03:00
Andrew Borodin
b0ed56e4e8 Merge branch '4154_rar6'
* 4154_rar6:
  Ticket #4154: support unrar v6.
2021-02-13 16:53:15 +03:00
Andrew Borodin
ba6b42802f Ticket #4154: support unrar v6.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-02-13 16:52:07 +03:00
Andrew Borodin
ac77cf731a Merge branch '3986_tests_logs'
* 3986_tests_logs:
  Ticket #3986: tests: do not write parallel to logfile.
2021-02-07 20:58:55 +03:00
Andreas Mohr
631cf4f3bf Ticket #3986: tests: do not write parallel to logfile.
Since automake-1.12 (test-driver script) libcheck logfile is written
parallel by automake.
Print test logging to stdout and let write to logfile by automake only.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-02-07 20:58:45 +03:00
Andrew Borodin
79628270a7 Merge branch '4160_complete_all_files'
* 4160_complete_all_files:
  editor: completing from all open files.
  editor: word completion: refactoring.
  editor: word completion: refactoring.
  Ticket #4160: mceditor: complete words from all open files.
2021-02-07 20:40:16 +03:00
Andrew Borodin
2420b7180b editor: completing from all open files.
Thanks Sebastian Gniazdowski <sgniazdowski@gmail.com> for the original
patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-02-07 20:37:36 +03:00
Andrew Borodin
3b476adcae editor: word completion: refactoring.
(edit_collect_completion_from_one_buffer): new function. Main loop of
completion searching is here now.

(edit_collect_completions): use edit_collect_completion_from_one_buffer().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-02-07 20:37:36 +03:00
Andrew Borodin
29720d04ab editor: word completion: refactoring.
(edit_collect_completions): return GQueue. Use GQueue inside.
Do not return an empty queue, create it if needed only.

(edit_complete_word_cmd): Use GQueue inside. Ged rid of limitation
of completions count. Rename variable.

(editcmd_dialog_completion_show): take GQueue. Rename and reorder
arguments.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-02-07 20:37:13 +03:00
Andrew Borodin
feca634073 Ticket #4160: mceditor: complete words from all open files.
Initial step: refactoring.

(edit_collect_completions_get_current_word): return GString. Get rid of
allocate and free an empty string, create string if needed instead.
Reduce variable scope.

(edit_collect_completions): related changes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-02-07 20:33:20 +03:00
Andrew Borodin
a34525c5fa Merge branch '4192_shadows_out_of_screen'
* 4192_shadows_out_of_screen:
  Ticket #4192: fix crash if shadow is out of screen.
2021-02-03 09:51:45 +03:00
Sergei Trofimovich
6394547dbf Ticket #4192: fix crash if shadow is out of screen.
(tty_clip): add extra tests for area boundaries.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-02-03 09:47:13 +03:00
Andrew Borodin
c7306aae18 Merge branch '4171_silent_macro'
* 4171_silent_macro:
  Ticket #4171: fix usermenu and macro system() calls disrupting terminal.
2021-01-31 19:28:41 +03:00
Sebastian Gniazdowski
8177cdd0f1 Ticket #4171: fix usermenu and macro system() calls disrupting terminal.
(execute_menu_command): prepare terminal to run system() and restore
after.

(user_menu_cmd): fix comment.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-01-26 13:52:13 +03:00
Andrew Borodin
09e904bf3d Merge branch '4182_cmdline_update'
* 4182_cmdline_update:
  Ticket #4182: fix command line update.
2021-01-24 14:27:15 +03:00
Andrew Borodin
653961523c Ticket #4182: fix command line update.
(setup_cmdline): don't update command line if it's invisible.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-01-24 14:26:31 +03:00
Andrew Borodin
25bc8a64d9 Merge branch '4182_osx_ncurses_ftbfs'
* 4182_osx_ncurses_ftbfs:
  Ticket #4181: FTBFS against NCurses on OS X 10.9.5.
2021-01-24 14:23:40 +03:00
Andrew Borodin
ba62dd32ad Ticket #4181: FTBFS against NCurses on OS X 10.9.5.
lib/tty/tty-ncurses.h: define _XOPEN_SOURCE_EXTENDED to use cchar_t,
getcchar(), setcchar().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-01-24 14:19:22 +03:00
Andrew Borodin
a75071b3c0 Merge branch '4180_mc.ext_zip_regex'
* 4180_mc.ext_zip_regex:
  Ticket #4180: fix handling of zip archives.
2021-01-24 14:11:02 +03:00
Andrew Borodin
7881ed2fda Ticket #4180: fix handling of zip archives.
After 8857423e4e due to
using "file -z", zip archves w/o ".zip" file name extension
(i.e. "ff_ext.xpi", a Firefox extension) aren't handled
as zip archives.

misc/mc.ext.in: fix regular expression for zip format.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-01-23 21:10:04 +03:00
Andrew Borodin
a88a626e76 Fix segfault on switch to subshell in mcedit/mcview/mcdiffview.
(do_update_prompt): fix NULL dereference. In case of running mc
as standalone editor/viewer/diffviewer, the subshell_prompt variable
is NULL.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-01-18 21:27:26 +03:00
Yury V. Zaytsev
33c84e75e6 Update doc/NEWS file
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2021-01-10 15:17:18 +01:00
Yury V. Zaytsev
eaee877af6 Update hints translations from Transifex
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2021-01-10 15:10:32 +01:00
Yury V. Zaytsev
eafffd8459 Update translations from Transifex
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2021-01-10 13:40:54 +01:00
Andrew Borodin
fd65a1654d (edit_store_macro_cmd): restore lost 'else'.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-01-05 08:27:42 +03:00
Andrew Borodin
5a45ed1583 Fix segfault on adding current path to hotlist.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-01-03 08:15:56 +03:00
Andrew Borodin
485ea75cbe Merge branch '4103_cleanup'
* 4103_cleanup: (56 commits)
  Update po/*.po files.
  (tree_store_load_from): remove extra parenthesis.
  (tree_store_load_from): fix copy-into-fixed-size-buffer warning.
  (create_panel): remove extra test of midnight_dlg.
  (edit_scroll_screen_over_cursor): fix copy-paste error.
  (pipe_mail): fix unchecked return value warning.
  tests/lib/strutil/Makefile.am: remove unsed include path.
  (edit_read_syntax_file): fix logically dead code.
  (edit_suggest_current_word): the NULL check is unnecessary...
  (edit_get_match_keyword_cmd): fix possible NULL dereference.
  (x_basename): the NULL check is unnecessary...
  (mcview_growbuf_read_until): the NULL check is unnecessary...
  (cpio_read_bin_head): fix unintended sign extension.
  Move cd_to() to separate file.
  Refactoring: rename functions
  (do_cd_command): refactoring: get path only
  (examine_cd): return GString.
  (copy_file_file): minor refactoring.
  (handle_console_linux): fix resource leak.
  (open_error_pipe): fix resource leak.
  ...
2020-12-31 16:35:22 +03:00
Andrew Borodin
f8a88007f4 Update po/*.po files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:34:55 +03:00
Andrew Borodin
01ca2756e1 (tree_store_load_from): remove extra parenthesis.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andrew Borodin
1c8400d6ef (tree_store_load_from): fix copy-into-fixed-size-buffer warning.
Found by Coverity.
Coverity id #32616.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andrew Borodin
a17dd53c29 (create_panel): remove extra test of midnight_dlg.
midnight_dlg is never NULL in create_panel().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andreas Mohr
3cd408407d (edit_scroll_screen_over_cursor): fix copy-paste error.
Found by Coverity.
Coverity id #32566.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andreas Mohr
3114240921 (pipe_mail): fix unchecked return value warning.
If function failed, fail early.

Found by Coverity.
Coverity id #32538.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andrew Borodin
c1ed403c02 tests/lib/strutil/Makefile.am: remove unsed include path.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andreas Mohr
dfb81a3dae (edit_read_syntax_file): fix logically dead code.
Statement cannot be true at this state.

Found by Coverity.
Coverity id #32572.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00