Commit Graph

1162 Commits

Author SHA1 Message Date
Andrew Borodin
c08c90cd1b (input_execute_cmd): refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:20:53 +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
454479549c Update copyright years. 2015-02-26 09:12:08 +03:00
Andrew Borodin
6ed1eba88f (mc_search_regex_prepare_replace_str): refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:12:08 +03:00
Andrew Borodin
fa7d2ea110 lib/search/regex.c: use [] to get char in string. 2015-02-26 09:12:08 +03:00
Andrew Borodin
2c7dfe7341 (mc_search_prepare_replace_str2): make replace_str const.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:12:08 +03:00
Andrew Borodin
589d0bea0b (mc_search__regex_str_append_if_special): refactoring of loop and conditions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:12:08 +03:00
Andrew Borodin
8ce85a419b Ticket #3265: code cleanup before 4.8.14 release.
(mc_search_regex__process_append_str): fix condition.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:12:07 +03:00
Boris Savelev
933fd255d0 Ticket #2743: File selection by patterns uses bytes instead of (unicode) characters.
Using the "?" pattern in the file selection dialog brought up with '+',
mc uses the file name length in bytes instead of characters.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2015-02-25 12:59:57 +03:00
Boris Savelev
6ca737d230 The patch does not intend to fix all Bash patterns (I believe mc never claimed to support all kinds of them), but it fixes some issues.
Namely, backslash-escaped metacharacter like {}*? will remain in the pattern (with the current code it is just stripped). Second, comma will be transformed to | only inside a group.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2015-02-24 14:58:51 +03:00
Andrew Borodin
96699b7eba Ticket #3390: fix backward word delete in input fields.
How to reproduce:
Either on the command line, or in any other text entry field (e.g. copy
file to) enter a string where the last word consists of one single
letter only. E.g. "abc de f".
Press Alt+Backspace.

Expected behavior: Remove the last word, that is, the letter "f" only,
leaving "abc de ".

Actual behavior: Yet another word is removed, leaving "abc ".

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-20 09:13:08 +03:00
Andreas Mohr
29d4afc657 Ticket #3404: fix order of old_colors table items.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-18 09:40:18 +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
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
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
052ac838aa Add semicolon to the table of key code names.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 12:57:47 +03:00
Andrew Borodin
ce568de9b9 (name_quote): refactoring
...and related modifications.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 12:57:47 +03:00
Andrew Borodin
720f214482 (status_msg_init): repaint screen forced to remove previous finished dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-10-03 13:19:26 +04:00
Andrew Borodin
81201b3022 status_msg_t: reimplement delay usage.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-10-03 13:19:25 +04:00
Andrew Borodin
89621050e3 (mc_time_elapsed): add new function to detect elapsed time intervals.
The author of initial patch is Egmont Koblinger.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-10-03 13:19:25 +04:00
Andrew Borodin
be938c611b Ticket #3247: refactoring of status_msg engine.
Initial commit: create global timer.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-10-03 13:19:25 +04:00
Paul Barker
e78b636eba Ticket #3267: mc fails to build against musl libc.
mc fails to build when using musl as the libc provider. This is due to
the CTRL() macro not being defined in <termios.h>. We could include
<sys/ttydefaults.h> explicitly but it's easier just to ensure CTRL is
defined.

This patch taken from the Sabotage Linux distro which fixes this. This
patch has also been tested and works with the OpenEmbedded build
system.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-10-01 15:19:54 +04:00
Andrew Borodin
a31b78003e Ticket #2966: fix view of broken manpages.
Initial commit: create MC pipe class to capture stdout and stderr of
spawn processes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-09-27 20:24:12 +04:00
Ilia Maslakov
94a1c98aea Ticket #3228 (select/unselect files with the same extension as the current file)
Add Action 'SelectExt' for select/unselect files with the same extension as the current file.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2014-09-25 15:07:55 +04:00
Egmont Koblinger
a3d75ae300 Ticket #3241: colon was not recognized inside escape seq in prompt.
export PS1=$'\[\e[38:5:214m\]orange$\[\e[0m\]'
mc

Expected: "orange$" prompt shows up in black under the panels.
Actual: some additional garbage.

The 256-color and true-color escape sequences should allow either ';' or
':' inside as separator, actually, ':' is the more correct according to
ECMA-48. Some terminal emulators (e.g. xterm, gnome-terminal) support
this.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-09-03 11:31:14 +04:00
Andrew Borodin
d6004701cc Fix indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-09-02 15:57:56 +04:00
Veres Lajos
8d4d8d275f A few typofixes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-09-02 15:32:36 +04:00
Andrew Borodin
6d82155270 Massive use of MC_PTR_FREE macro.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-09-02 15:32:36 +04:00
Andrew Borodin
de026dd1fc Add declaration of g_error_new_valist().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-09-02 15:32:36 +04:00
Andrew Borodin
4c27f7900c (input_event): fix handling of first mouse click. 2014-08-12 20:48:47 +04:00
Andrew Borodin
ddd336ad4d Ticket #3225: first Backspace/Delete ignored after mouse click in an input widget.
Initial commit: WInput: refactoring of text marking.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-08-03 14:54:16 +04:00
Andrew Borodin
a5488affc8 Indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:53:10 +04:00
Andrew Borodin
c672ed9b21 (label_set_textv): new WLabel API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:40:30 +04:00
Andrew Borodin
9d4bafd889 (simple_status_msg_t): simple status message with label and 'Abort' button.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:40:30 +04:00
Andrew Borodin
55e604901f Create status dialog window to interrupt long-time operations.
Such dialog allows:
  * show status of operation;
  * control operation using dialog buttons (Abort, Suspend, Resume, etc).

Status dialog is raised after specified delay after operation start.
If operation duration is less than delay, the status dialog is not raised.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:40:30 +04:00
Andrew Borodin
62faec3a61 Ticket #2136: implement user-friendly interruption of long-time operations.
Initial step: created a simple timer.

Unlike GTimer, mc timer doesn't use a lot of multiplications and
divisions to convert seconds to nanoseconds and back. mc timer use only
multiplications to convert seconds to microseconds.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:40:30 +04:00
Andrew Borodin
e786d8266e (mouse_get_local): set Gpm_Event::modifiers only if libgpm is used.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:35:51 +04:00
Slava Zanko
512ad7d962 Make working with GError in more right way (like with exceptions).
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2014-07-22 13:12:07 +04:00
Andrew Borodin
f72cf464c9 (FileProgressStatus): change values to avoid overlapping with B_* values.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:07 +04:00
Andrew Borodin
478e58dfa2 (listbox_event): clarify check whether listbox is empty.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:07 +04:00
Andrew Borodin
e6030d8e74 Sync with gnulib 94ee038129c3b40510ef0ff6ac6ddfe85bf0f97f.
(xstrtoumax): use enum instead of 0, to pacify IRIX 6.5 cc.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:06 +04:00
Andrew Borodin
acf34eb98e (mc_config_get_string_list): clarify usage.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:06 +04:00
Andrew Borodin
725997c8d0 (mc_config_get_groups): optimization of function itself and usage.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:06 +04:00
Andrew Borodin
e62906473b (mc_config_get_keys): optimization of function itself and usage.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:06 +04:00
Andrew Borodin
8c040b46b8 (x_basename): fix dereference of null pointer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:41 +04:00
Andrew Borodin
a6c5c82fa0 (str_ascii_fit_to_term): fix out-of-bound write.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:41 +04:00
Andrew Borodin
4e5819d169 (str_8bit_fit_to_term): fix out-of-bound write.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:41 +04:00
Andrew Borodin
708f474d1e (mc_search_regex__process_append_str): fix possible dereference of null pointer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:41 +04:00
Andrew Borodin
e7252b6603 (lock_extract_info): fix out-of-bound writes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:41 +04:00