Commit Graph

789 Commits

Author SHA1 Message Date
Andrew Borodin
9a406992a5 Ticket #2705: the 0x prefix for hexadecimal search is optional now.
Hexadecimal values like "2d f0" can be used as well as "0x2d 0xf0"
in all search dialogs where hexadecimal search is supported.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-07 11:39:12 +03:00
S. Melnikov
9aadcfe970 Ticket #2105 (mcview backward search)
Until 4.7 '/' was forward and '?' backward search.
    In current releases both keys are bound to ViewSearch
    so one must manually choose Backwards option in the dialog.

(cherry picked from commit a3ddfd14ea)

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-02-05 10:56:32 +03:00
Andrew Borodin
a14d931f46 Ticket #2704: added hotkeys for search types.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-01-14 10:41:45 +03:00
Ilia Maslakov
3e15b5af64 Ticket #86 (disable X11 from command line)
added option --no-x, -X for starting mc without X11 support.
    updated documentation: es, hu, it, en, pl, ru, sr.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-12-22 11:36:05 +04:00
Slava Zanko
1dffc24f9b Fixed user defined home dir, if home dir contain tilda (~/)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-12 12:30:35 +03:00
Slava Zanko
44de4d1b1f Fixed memory leak in lib/serialize.c
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-12 12:23:25 +03:00
Andrew Borodin
b49c165c59 (mc_config_normalize_before_save): fixed possible memory leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-12-12 12:23:25 +03:00
Andrew Borodin
d412b1ec8f (history_put): unused. Removed.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-12-12 12:23:25 +03:00
Andrew Borodin
d305e5099c Moved declaration of old_esc_mode_timeout variable to the proper file section.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-12-12 12:23:25 +03:00
Andrew Borodin
6704d927c0 (tty_lowlevel_getch): used in lib/tty only.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-12-12 12:23:25 +03:00
Slava Zanko
1ba18c54b0 Ticket 2686: Code cleanup
Avoid compiler warnings

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-12 12:23:25 +03:00
Sergey
fac8c5d2f3 Ticket #2625: mc does not preserve file mtime when copying over ssh
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-12 11:51:25 +03:00
Egmont Koblinger
b4912875b5 Ticket #2662: Calculating free space by ctrl+space doesn't work.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-09 13:05:03 +03:00
Andrew Borodin
d99feea391 Ticket #2678: fixup of filemanager layout after screen resize.
Initial state: forced suspend the previous screen when new screen has
been created. Forced resume the current screen when the previous screen
has been closed. Don't redraw suspended screens, just set sinch_pending
flag. Screen will be redrawn immediately after resume.

This commit allow ret rid of setup_panels() call if screen is resized
and filemanager is not active screen at that time.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-12-07 16:02:20 +03:00
Slava Zanko
29ba0a0cda Show error and don't start if config directory is a regular file
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Slava Zanko
6b2c8d4800 Fixed migration rules
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Slava Zanko
162a330f42 Added unit test for mc_config_get_full_path() function
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Slava Zanko
6c32fa3b84 Added function mc_config_get_full_path() for search user's config files by short names.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Slava Zanko
25c9267ac3 Some config files moved to more appropriate places.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Slava Zanko
a8c3ab345d Changed source code for respect '--enable-homedir' configure option.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Andrew Savchenko
6d99accfe0 Ticket #2676 (save of some learned keys is broken)
fixed saving of 'F13'-'F20' learned keys.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-12-06 11:42:20 +04:00
Egmont Koblinger
026b07a2ab Ticket #2662: support extended mouse clicks beyond 223.
The ancient way of reporting mouse coordinates only supports coordinates
up to 231, so if your terminal is wider (or taller, but that's unlikely),
you cannot use your mouse in the rightmost columns.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-11-29 09:50:03 +03:00
Ilia Maslakov
e1231e3d8e Ticket #2653 (fixed: input password)
Fixed: input field in password mode is fully masked with asterisks.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-11-03 16:46:31 +04:00
Slava Zanko
ffbd9561f0 Ticket #2652: SMB is broken
After #2361, smb vfs module doesn't work at all.
The error message "Cannot chdir to ..." raises after hostname enter.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-31 23:31:59 +03:00
Andrew Borodin
1673c37548 Ticket #2637: faster startup of mc.
Since content of keymap file is ASCII-only and case insensitive,
don't use some utf8-manipulation: g_ascii_strcasecmp() is used
instead of str_casecmp().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-31 15:49:36 +03:00
Andrew Borodin
0035a1de73 Ticket #2643: can't compile on OpenIndiana (Solaris)
lib/vfs/parse_ls_vga.c: added #include "lib/unixcompat.h" where makedev
macro is defined.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-28 11:59:33 +04:00
Ilia Maslakov
48460f6ca1 changed mc.keymap 2011-10-27 15:59:24 +04:00
Ilia Maslakov
5c252726f1 Ticket #275 (panelize enhancement)
added ".." at the top of file list (after external panelization)
    added ".." at the top of file list (after 'find' panelization)
    disable ctrl-r (refresh) for panelized content
    added menu entry Left\Panelize, to restore panelized panel

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>

Minor changes in goto_parent_dir()
many code optimization

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>

little fixup

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-10-27 15:54:57 +04:00
Sergei Trofimovich
fbb770d47a fix build error in ‘vfs_preallocate’: vfs.c:613:12: error: ‘dest_desc’ undeclared (first use in this function)
When platform does not define HAVE_POSIX_FALLOCATE we get this error:

  CC     vfs.lo
../../../../mc/lib/vfs/vfs.c: In function 'vfs_preallocate':
../../../../mc/lib/vfs/vfs.c:613:12: error: 'dest_desc' undeclared (first use in this function)
../../../../mc/lib/vfs/vfs.c:613:12: note: each undeclared identifier is reported only once for each function it appears in
../../../../mc/lib/vfs/vfs.c:610:22: warning: unused parameter 'dest_vfs_fd' [-Wunused-parameter]

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2011-10-26 07:56:46 +03:00
Sergey
95c553c467 Ticket #2635: mc adds spaces an the beginning of all files/dirs at the ftp server
For FTP servers, that do not send ".." in directory listing, mc adds one space to the name of every file and directory. Attached patch should fix this problem.

Steps to reproduce:
cd /#ftp:ftp.symantec.com

Expected result:
Correct list of files/directories

Actual result:
File/directory names with leading spaces

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-24 21:17:28 +03:00
Sergey
3e1b644f41 Ticket #2372 (Editor sometimes shows multibyte UTF-8 chars as two dots)
Sometimes when text contain multibyte UTF-8 chars, editor shows two dots instead of some letter.
When moving text cursor after that letter it will be displayed properly.
When moving cursor back (before letter) it will be displayed again as two dots.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>

added UTF8_CHAR_LEN

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-10-24 11:19:03 +04:00
Oswald Buddenhagen
1c0cc50a3f Ticket #2639: doesn't compile when using --disable-nls
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-23 16:21:36 +04:00
Slava Zanko
41af257135 Added configuration option 'preallocate_space' for toggle space preallocating behaviour.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-20 10:51:08 +03:00
Slava Zanko
323fedecd7 Added implementation for files space preallocation
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-20 10:51:08 +03:00
Andrew Borodin
664b3efcda Ticket #2623: vfs: use data after free.
(vfs_s_close): vfs-specific data of file handler
vfs_file_handler_t::data is freed in vfs_s_subclass::fh_close method and
then can be used in vfs_s_subclass::file_store_one. Bug is related to
ftp and fish VFSes.

Added new vfs_s_subclass::fh_free_data method to free vfs-specific data
of file handler vfs_file_handler_t::data. Use it in ftp and vfs VFSes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-19 12:45:28 +04:00
Slava Zanko
0138645541 Ticket 1551: Update GPL version from 2 to 3
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-18 14:08:34 +03:00
Andrew Borodin
ce1249f052 Added percent sign to key names.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:04 +03:00
Andrew Borodin
cef8eb5cc4 (mc_refresh): moved from lib/widget/wtools.[ch] to lib/widget/dialog-switch.[ch]
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
6273917e33 (size_trunc_len): fixed potential integer overflow if SI is used.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
6dabcb5f55 VFS small optimization
(vfs_class_data_find_by_handle, vfs_class_find_by_handle): move same
code to the separate function vfs_get_openfile().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
8f4b9e32f1 Remove extra screen update after show help.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
79023b26a4 (mc_build_filename): incorrect processing of first element of path.
If first element is relative, the result path should be also relative
not absolute.

If first element is empty, the result path is relative.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
b63eea10cb (mc_build_filename): fixed incorrect processing of empty paths.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
b61e0fc6a9 (_vfs_get_cwd): fixed memory leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
1c0e5a4773 Fix potential segfault in term_trim() functions
...if requested width is negative.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Slava Zanko
a1e34b8dfa Code cleanup after runing splint on src/main.c file
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-17 13:30:03 +03:00
Andrew Borodin
f68b35b475 (try_complete): fixed warinig:
input_complete.c:874:26:  warning: use of logical && with constant
operand; switch to  bitwise & or remove constant
[-Wconstant-logical-operand]
    if (q && q[1] == '(' && INPUT_COMPLETE_COMMANDS)
                         ^  ~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
6c5a679b85 Use ESC_STR macro instead of hardcoded "\033".
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
b982f70d4b Value accuracy of mouse_enabled global variable.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
cd1e5fb76d Nice location of red (warning and error) dialogs.
Now warning/error dialog overlaps the previous status dialog.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00