Commit Graph

5062 Commits

Author SHA1 Message Date
Andrew Borodin
be38f70704 Ticket #3285: mcedit: show full path to file in the status line.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-03-15 07:15:23 +03:00
Andrew Borodin
8549dd9aa9 Ticket #3409: (user_menu_cmd): fix help topic for user menu.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-03-14 13:36:24 +03:00
Andrew Borodin
8c88aa01ad Remove code required for GLib < 2.14.0.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:20:54 +03:00
Andrew Borodin
ea2e5bf0b2 Ticket #3405: mcview: use VIEW_SELECTED_COLOR in plain mode.
Thanks Andreas Mohr <and@gmx.li> for the original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:20:54 +03:00
Andrew Borodin
448935fa5b (dirsize_status_update_cb): use local variables instead of type casting. 2015-02-26 09:20:54 +03:00
Andrew V. Samoilov
964056fb65 * background.c (background_attention): Fix memory leak. 2015-02-26 09:17:10 +03:00
Andrew Borodin
5cbfc77d2c g_utf8_next_char() never returns NULL. Remove redundant checks.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:17:10 +03:00
Andrew Borodin
67f465209b diffviewer: clarify support of UTF-8 codeset.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:17:10 +03:00
Andrew Borodin
6441fa0bfa Ticket #3262: rename variables.
Use 'char_length' name for variables that store the length of multi-byte
character.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:17:01 +03:00
Andrew Borodin
42e7e39bd8 Add IS_PATH_SEP macro and use it.
Also massive use of PATH_SEP and PATH_SEP_STR macros.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:13:02 +03:00
Andrew Borodin
990e3053b3 (edit_get_match_keyword_cmd): use PATH_SEP_STR instead of G_DIR_SEPARATOR_S.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:12:08 +03:00
Andrew Borodin
454479549c Update copyright years. 2015-02-26 09:12:08 +03:00
Boris Savelev
f45784eabb Ticket #358: MC freezes when copying from one FTP location to another
The copy operation will still be impossible, but you'll get error message instead of hang.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2015-02-25 15:04:17 +03:00
Slava Zanko
4d2cefa81e Add '?' sign as a possible mark of wildcard.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2015-02-25 13:25:46 +03:00
Boris Savelev
ec0dd74248 Fix for issue:
When copying to directory with a name containing special symbol "*" the copy command didn't do it in a right way.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2015-02-25 13:25:46 +03:00
Slava Zanko
dbbd8a7cdc Ticket #3235: copy files dosn't work as expected, when copying to a directory with the special symbol in its name
Add new test which covers current functionality of 'is_wildcarded' function.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2015-02-25 13:25:46 +03:00
Andrew Borodin
3d61dcd782 Ticket #3162: "Directory scanning" window is too narrow.
(dirsize_status_update_cb): redraw "Directory scanning" window after
enlargement.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-20 09:17:45 +03:00
Andrew Borodin
34a25459d2 Ticket #3389: mcviewer: clarify usage of G_UNICODE_SPACING_MARK.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-20 09:06:55 +03:00
Andreas Mohr
15cf75d63e Ticket #3263: mcview hex: fix incorrect highlight when search string not found.
Restore previous string selection if search failed.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-18 13:40:40 +03:00
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
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
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
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
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
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
Piotr Drąg
1d20eeb4f7 Fix a minor typo
Reported by helix84 on Transifex.
2015-02-12 16:38:53 +01: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
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
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
3cc1c89c1c Code indentation
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2014-12-22 11:54:02 +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
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
Andrew Borodin
172196d16a (edit_read_syntax_rules): fix pointer tests.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 13:04:24 +03:00
Andrew Borodin
4dd577fbe0 mceditor: reimplement syntax name list using GPtrArray.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 13:04:24 +03:00
Andrew Borodin
7f8135d071 Ticket #3277: Info panel can't obtain file system statistics on Solaris.
(read_file_system_list): initialize variable.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 12:57:47 +03:00
Andrew Borodin
e9c5fb3048 (mcview_offset_doz): use more. 2014-12-10 12:57:47 +03:00
Andrew Borodin
0ad09aa393 Sync with gnulib 2768ceb7994506e2cfba88be3b6bd13ef5440a90.
mountlist: don't use libmount to decide on dummy/remote.

Don't use the libmount routines to determine whether a file system is
dummy or remote, as they're not currently compatible. For example the
remoteness is determined on file system type (for which the list seems
incomplete), rather than simply checking for a ':' in the device name.
Also libmount currently determines that 'tmpfs' is a dummy file system
even though it has associated storage.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 12:57:47 +03:00
Andrew Borodin
12fac096ed Sync with gnulib 3ea43e02541ece750ffc6cd1dfe34195421b4ef3.
mountlist: use /proc/self/mountinfo when available

Use libmount to propagate device IDs provided by Linux in
/proc/self/mountinfo.  This will give more accurate output when using df
in chroot'ed environments as the device IDs are not determined by stat()
which may be inaccurate within the chroot.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 12:57:47 +03:00
Andrew Borodin
3edcc3fd77 (mcview_dimen_min): remove. Use min() macro instead.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 12:57:47 +03:00
Andrew Borodin
c20e96b4bc (mcview_get_byte_string): minor optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 12:57:47 +03:00
Andrew Borodin
60e1a06c06 mcviewer: clarify support of UTF-8 codeset.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 12:57:47 +03:00