Commit Graph

12905 Commits

Author SHA1 Message Date
Egmont Koblinger 89d2db5ca3 Ticket #3065: support of italic text.
Italic text is supported by S-Lang since pre2.3.0-107 and NCurses since 5.9.20130831.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-17 15:22:53 +03:00
Andrew Borodin 45d135d768 Merge branch '3261_hexedit_cjk_overflow'
* 3261_hexedit_cjk_overflow:
  Ticket #3261: mcview hex edit: CJK overflow.
2015-02-17 14:33:14 +03:00
Egmont Koblinger 10c938451d Ticket #3261: mcview hex edit: CJK overflow.
At certain terminal widths (including the default 80), if the last byte
of a line begins a CJK character then the corresponding glyps is drawn
in the last column, so it's replaced by a replacement symbol.

The default layout should, at all possible terminal widths, have an
extra last character column that is empty normally, but allows room for
a CJK to overflow here.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-17 14:30:37 +03:00
Andrew Borodin bdb3d06f94 Merge branch '3260_hexedit_utf8_input'
* 3260_hexedit_utf8_input:
  Ticket #3260: mcview hex edit: can't enter certain UTF-8 characters.
2015-02-17 13:59:17 +03:00
Egmont Koblinger f0ab29b820 Ticket #3260: mcview hex edit: can't enter certain UTF-8 characters.
(mcview_handle_editkey): an is_printable() check was performed for every
byte of the UTF-8 which obviously doesn't make sense. This check
shouldn't be performed for 8-bit charsets either. If the given byte can
arrive as input, the file should be modified accordingly.
The TAB key shouldn't be accepted as literal, to allow moving back to
the hexview area.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-17 13:57:26 +03:00
Andrew Borodin c00c298b53 Merge branch '3259_hexedit_utf8'
* 3259_hexedit_utf8:
  Ticket #3259: mcview hex edit: UTF-8 chars are not updated.
2015-02-16 10:38:27 +03:00
Egmont Koblinger a7d326d30b Ticket #3259: mcview hex edit: UTF-8 chars are not updated.
UTF-8 characters show up nicely in the right column (followed by a space
to align with the number of bytes).

However, as soon as you edit the file (either by the hex codes, or by
moving to the right column and entering an UTF-8 character), that
character doesn't show up there.

Expected: during editing the file, the right hand side should
continuously be updated to look exactly as if that was the original
contents of the file.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-16 10:29:03 +03:00
Andrew Borodin 65b7867c2d Merge branch '3253_quickview_commandline'
* 3253_quickview_commandline:
  (midnight_callback): don't execute command line from 'Quick view' panel.
  Ticket #3253: unexpected command line execution from Quick View panel.
2015-02-16 09:20:02 +03:00
Andrew Borodin 2680f60772 (midnight_callback): don't execute command line from 'Quick view' panel.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-16 09:17:20 +03:00
Andrew Borodin 8469c13f38 Ticket #3253: unexpected command line execution from Quick View panel.
When panel is set to 'Quick view' mode, some keys are handled by
mvciewer, and unhandled keys are passed to the command line. This is
very dangerous since user can easily type and execute a harmful command.

1st step:
  * (mcview_callback): don't pass any keys from mcviewer in QuickView
mode to the command line.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-16 09:17:20 +03:00
Andrew Borodin f5295f790b Merge branch '2027_bash_prompt'
* 2027_bash_prompt:
  Ticket #2027: don't overwrite the PROMPT_COMMAND bash variable.
2015-02-16 09:14:20 +03:00
Andrew Borodin 4361e49a36 Ticket #2027: don't overwrite the PROMPT_COMMAND bash variable.
Prepend value of system-wide PROMPT_COMMAND variable to the mc's one.

Thanks wjaguar for the idea and Serhiy Storchaka and Oswald Buddenhagen
for the patch itself.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-16 09:13:49 +03:00
Marco Ciampa d1e60b6feb Updated Italian translation. 2015-02-14 21:21:50 +01:00
Marco Ciampa 4c8c961c3d Merge pull request #51 from piotrdrag/master
Fix a minor typo
2015-02-14 19:51:25 +01:00
Piotr Drąg 62c08c6bf3 Fix missing verb in mc.1
Reported by helix84 on Transifex.
2015-02-14 16:35:49 +01:00
Piotr Drąg 1d20eeb4f7 Fix a minor typo
Reported by helix84 on Transifex.
2015-02-12 16:38:53 +01:00
Andrew Borodin 7695f0acf7 Merge branch '3391_mobi'
* 3391_mobi:
  Ticket #3391: support mobi e-books.
2015-01-22 09:24:18 +03:00
Nerijus Baliunas 56e72b4b50 Ticket #3391: support mobi e-books.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-01-22 09:22:46 +03:00
Andrew Borodin 176183a402 Merge branch '3287_poedit'
* 3287_poedit:
  Ticket #3287: bind poedit to Edit action for .po files.
2015-01-14 10:01:25 +03:00
Andrew Borodin 564deafe72 Ticket #3287: bind poedit to Edit action for .po files.
Thanks Marcel Pol <marcel at timelord dot nl> for original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-01-14 10:00:38 +03:00
Andrew Borodin 3fae7c227d Merge branch '2952_zero_length_substitution'
* 2952_zero_length_substitution:
  Add test for mc_search_glob_prepare_replace_str().
  Ticket #2952: search: fix zero-length substitution.
2015-01-14 09:51:22 +03:00
Andrew Borodin 47b02f4c23 Add test for mc_search_glob_prepare_replace_str(). 2015-01-14 09:50:50 +03:00
Andrew Borodin 5ecf12483a Ticket #2952: search: fix zero-length substitution.
Problem:
Suppose you want to replace a substring in some file names with another,
so you do a File Rename operation with source pattern:

*OLDSTRING*

and target pattern:

\1NEWSTRING\2

If OLDSTRING occurs inside a filename, it is replaced correctly, but if
at the beginning or end of the filename, the corresponding zero-length
wildcard match is replaced by literal \1 or \2, respectively.

Expected
Wildcards that match a zero-length substring should be substituted with
an empty string.

Thanks boris<> for the original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-01-14 09:50:50 +03:00
Andrew Borodin 774762a8e9 Merge branch '2966_view_broken_manpage_fix'
* 2966_view_broken_manpage_fix:
  Ticket #2966: mcview: fix segfault after switch from parse to raw mode and back.
2015-01-14 09:37:28 +03:00
Andrew Borodin 7413c9c2ab Ticket #2966: mcview: fix segfault after switch from parse to raw mode and back.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-01-14 09:37:08 +03:00
Slava Zanko 4011bfe301 Merge branch '3266_puppet_syntax'
* 3266_puppet_syntax:
  Ticket 3266: Add puppet manifest syntax support - use .pp extension (was used for Pascal highlighting)
2015-01-12 18:08:50 +03:00
Bostjan Skufca 17dddbbfda Ticket 3266: Add puppet manifest syntax support - use .pp extension (was used for Pascal highlighting)
Support for puppet manifest highlighting was kindly
provided by Sergey Zhuga, original is here:
https://github.com/scrill/puppet-syntax-mcedit

Mr. Zhuga agreed with inclusion in mainstream MC:
https://github.com/scrill/puppet-syntax-mcedit/issues/2

Reasons to favor puppet syntax over pascal for .pp files:
---------------------------------------------------------
I will not argue whether in 2014 pascal is still being used or not,
and to what extent. I would like to point out that whoever is using
any variation of pascal for any serious development, is probably not
using 'mcedit' as an IDE. Instead, this development activity is
probably situated in nice, fully-featured graphical IDE.

Platform wise, judging by the weekly download statistics of FreePascal
at SourceForge, at this moment more than 80% of all downloads are for
Windows environents. On the other hand Midnight Commander is Linux
based. Considering this in combination with speculation from the
previous paragraph, there seems to be only a small chance that 'mcedit'
is being used as an editor of choice for pascal development.

On the contrary, puppet currently certainly does have wider audience
amongst sysadmins, who regularly use Linux. Puppet master requires a
server (usually) and quite a few sysadmins edit files directly on
servers that act as puppet masters for puppet development
environments.

When accessing these servers remotely, mcedit comes very handy for
quick edits here and there. Also keep in mind that puppet files are
normally not very large. Therefore actual IDE would be an overkill and
'mcedit' does the job quite ok, but syntax highlighting would be
much appreciated.

To sum it up:
If we speculate about the *actual* usage of 'mcedit', I do believe that
a wider audience would benefit by having .pp files highlighted by
default with puppet syntax definition instead of pascal syntax
definition.
2015-01-12 17:58:01 +03:00
Andrew Borodin 6347de2a47 Merge branch '3181_wrappers'
* 3181_wrappers:
  Ticket #3181: fix creating of shell wrappers.
2015-01-09 20:52:55 +03:00
Egmont Koblinger d350d81627 Ticket #3181: fix creating of shell wrappers.
contrib/Makefile.am: mc.sh and friends should depend on config.status.
In this case contrib/*.?sh are recreated after each rerun of configure.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-01-09 20:46:10 +03:00
Andrew Borodin 55fc3c9614 src/viewer/ascii.c: fix comparision between signed and unsigned.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-01-08 20:41:19 +03:00
Andrew Borodin 1968d57573 src/viewer/ascii.c: fix unused variables in case of --disable-charset.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-01-08 20:40:09 +03:00
Andrew Borodin 6b5ba76c6a Merge branch '3250_mcviewer'
* 3250_mcviewer:
  Tickets #3250, #3256: rewrite mcview's rendering and scrolling
2015-01-08 19:30:50 +03:00
Egmont Koblinger bcb09f6ac4 Tickets #3250, #3256: rewrite mcview's rendering and scrolling
Major rewrite of mcview's parts responsible for rendering and scrolling the contents:
  * no more partial lines at the top and failure to scroll when Up or Down
    is pressed;
  * better handling of CJK characters;
  * handle combining accents;
  * improved nroff support;
  * more conventional scrolling behavior at the end of the file.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-01-08 19:30:12 +03:00
Slava Zanko 4f6d1d1d95 Updated Spanish MAN-file
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2014-12-28 21:49:56 +03:00
Slava Zanko 3cc1c89c1c Code indentation
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2014-12-22 11:54:02 +03:00
Andrew Borodin e4f3aed41f Merge branch '3339_mcedit_paste_to_clipboard'
* 3339_mcedit_paste_to_clipboard:
  Clarify description of clipboard_store and clipboard_paste options.
  Clarify flags and mode to open clipboard file.
  Ticket #3339: fix pasting from clipboard.
2014-12-22 08:08:17 +03:00
Andrew Borodin ede5f9bad4 Clarify description of clipboard_store and clipboard_paste options.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-22 08:07:43 +03:00
Andrew Borodin dcb19a3c83 Clarify flags and mode to open clipboard file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-22 08:07:43 +03:00
Andrew Borodin b9e06b5f2c Ticket #3339: fix pasting from clipboard.
When clipboard_paste option was set but clipboard utility was not
installed, nothing was pasted and clipboard file became empty.

Solution: reimplement pasting way using mc_pipe_t instead of my_system().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-22 08:07:43 +03:00
Andrew Borodin b7b78319f0 Merge branch '3265_cleanup'
* 3265_cleanup: (26 commits)
  Update po/*.po files.
  Ticket #3333: fix g_error_new_valist().
  lib/glibcompat.h: add missing include of stdarg.h.
  src/filemanager/boxes.c: move static functions to the matched section.
  (sel_skin_button): simplify.
  (format_file): remove unused arguments.
  mceditor: syntax: reimplement context list using GPtrArray.
  mceditor: syntax: remove syntax_keyword_t::first member.
  mceditor: syntax: reimplement keyword list using GPtrArray.
  (edit_read_syntax_rules): minor refactoring of keyword first chars collect.
  (edit_read_syntax_rules): fix pointer tests.
  mceditor: reimplement syntax name list using GPtrArray.
  Ticket #3277: Info panel can't obtain file system statistics on Solaris.
  Recognize "Java archive data (JAR)" as zip archive.
  (mcview_offset_doz): use more.
  Sync with gnulib 2768ceb7994506e2cfba88be3b6bd13ef5440a90.
  Sync with gnulib 3ea43e02541ece750ffc6cd1dfe34195421b4ef3.
  (mcview_dimen_min): remove. Use min() macro instead.
  (mcview_get_byte_string): minor optimization.
  mcviewer: clarify support of UTF-8 codeset.
  ...
2014-12-10 13:14:14 +03:00
Andrew Borodin 42480d9579 Update po/*.po files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 13:13:23 +03:00
ginggs 8c1c48f61e Ticket #3333: fix g_error_new_valist().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 13:09:13 +03:00
Andrew Borodin 77a45cdafb lib/glibcompat.h: add missing include of stdarg.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 13:09:13 +03:00
Andrew Borodin f195a75ee8 src/filemanager/boxes.c: move static functions to the matched section.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 13:09:13 +03:00
Andrew Borodin 2d1c6ed669 (sel_skin_button): simplify.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 13:04:24 +03:00
Andrew Borodin 7b96b56010 (format_file): remove unused arguments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 13:04:24 +03:00
Andrew Borodin 9703378726 mceditor: syntax: reimplement context list using GPtrArray. 2014-12-10 13:04:24 +03:00
Andrew Borodin 3faf53b6c3 mceditor: syntax: remove syntax_keyword_t::first member.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 13:04:24 +03:00
Andrew Borodin 8307c12bd4 mceditor: syntax: reimplement keyword list using GPtrArray.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 13:04:24 +03:00
Andrew Borodin 32cfbfaef1 (edit_read_syntax_rules): minor refactoring of keyword first chars collect.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 13:04:24 +03:00