Commit Graph

760 Commits

Author SHA1 Message Date
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
Andrew Borodin
bb8babce1e (dlg_find_by_id): use the GLib way to find widget.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
db2fa05e27 (menubar_arrange): fixed typos.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
ba86de945c Optimization of walking in dialog widgets.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:55 +03:00
Slava Zanko
12dfe1bd55 VFS ftpfs: fixed broken filenames in unaligned 'ls' command output
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 20:10:48 +03:00
Slava Zanko
20c4694ee5 Ticket #2594: ftp failures - leading white space in file name
Code cleanup: move 'ls' output parser (and functions-satellites) to
new file parse_ls_vga.c

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 20:10:48 +03:00
Slava Zanko
372cf39a4f Fixed regexp error if current codepage isn't equal to UTF-8 in UTF-8 environment
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 13:50:02 +03:00
Slava Zanko
20a79d52ab Ticket #2595: Broken panels recode in current master
Fixed path recoding

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 13:50:02 +03:00
Slava Zanko
70ff1dc3aa Removed mc_global.args structure.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 14:12:10 +04:00
Ilia Maslakov
67c35a20a6 Added -g, --oldmouse option to support of NORMAL/BUTTON_EVENT mouse type.
Required for some terminals (screen/tmux) to force needed mouse type
(BUTTON_EVENT by default).

Normal tracking mode sends an escape sequence on both button press and release.
Mouse highlight tracking notifies a program of a button press, receives a range of
lines from the program, highlights the region covered by the mouse within that
range until button release, and then sends the program the release coordinates.
It is enabled by specifying parameter 1001 to DECSET.

Button-event tracking is essentially the same as normal tracking, but xterm also
reports button-motion events. Motion events are reported only if the mouse pointer
has moved to a different character cell. It is enabled by specifying parameter 1002 to DECSET.
On button press or release, xterm sends the same codes used by normal tracking mode.

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

changed mc.1.in, added description of command line options -g, --oldmouse.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-09-08 14:12:10 +04:00
Slava Zanko
bfbe9b94ae Removed global variable slow_tty
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 14:12:10 +04:00
Slava Zanko
9d9935d290 Removed global variable ugly_line_drawing
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 14:12:10 +04:00
Slava Zanko
8d44ed297b Moved xterm_flag global variable to mc_global.tty.xterm_flag
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 14:12:10 +04:00
Andrew Borodin
387bad2c7e Move SIGWINCH handler initialization to tty_init()
... and rename tty_low_level_change_screen_size() to
tty_change_screen_size().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-08 14:11:51 +04:00
Andrew Borodin
ad0a5015d3 Fix of mouse and ca capabilities check.
Based on patch from Andrey V. Malyshev <amal krasn ru>
http://mail.gnome.org/archives/mc-devel/2005-November/msg00052.html

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-08 14:10:58 +04:00
Andrew Borodin
09123c9fc9 Refactoring of TTY layer shutdown.
Unification of tty_shutdown() function as for S-Lang as for NCurses.
Added do_exit_ca_mode() call to the NCurses-based tty_shutdown().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-08 14:10:58 +04:00
Andrew Borodin
68468a25ac Ticket #2601: incorrect TTY layer initialization.
The xterm_flag variable was initialized in setup_mc() but used
first time in init_key() and in tty_init() (in do_enter_ca_mode())
before setup_mc() call.

Now xterm initialized in early step of mc start up process and
xterm support and mouse are initialized in tty_init().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-08 14:10:51 +04:00
Andrew Borodin
fc3bb20f09 (size_trunc): added ability to show size in [G|g]bytes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-08-30 21:36:13 +04:00
Andrew Borodin
12c893c73e (size_trunc_len): process full range of uintmax_t type.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-08-30 21:36:13 +04:00
Andrew Borodin
3ec8721f47 (mc_search__hex_translate_to_regex): optimization and cleanup.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-19 12:45:10 +04:00
Andrew Borodin
efb4206883 Ticket #2579: incorrect length usage in hexadecimal search.
(mc_search__hex_translate_to_regex): don't use length of original string
after leading whitespace trim.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-19 12:34:11 +04:00
Slava Zanko
1940e8f5dd Fixed broken search results highlighting
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-19 09:51:08 +03:00
Andrew Borodin
c4b95bcd32 Ticket #2576: fix of symbols duplication.
dialog_map, input_map and listbox_map variabels are declared and defined twice.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-14 21:46:59 +04:00
Slava Zanko
d3bb9de01f Ticket 2570: Code cleanup
Moved tests from lib/tests to tests/lib directory

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-11 20:23:44 +03:00
Slava Zanko
4e56efafe6 Ticket #81: savannah: can't access files on ftp starting with space
files starting with space can't be acessed by mc through ftp - it
shows the file as not having the leading space and attempts to
access it produce 'permission denied' errors.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-11 19:50:32 +03:00
Andrew Borodin
17033652ee Revert "Ticket #2453: aggressive screen repaint"
This reverts commit f809e6cf7a.

While navigating in main menu (from one submenu to another one)
or after closing a dialog, the screen is blinking.
2011-07-09 20:39:46 +04:00
Slava Zanko
63c0f34dce Direct commit: Fixed double memory free in input histoey list.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-09 11:55:30 +03:00
Andrew Borodin
f3fefa67f6 (push_history): fixed memory leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-08 20:48:53 +04:00
Andrew Borodin
630bcae4d4 (input_destroy): optimization: don't do useless actions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-08 20:48:53 +04:00
Andrew Borodin
de5fac8d0a Ticket #2545: fixup of saving WInput history.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-08 20:48:53 +04:00