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>
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>
(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>
(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>
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>
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>
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>
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>
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>
(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>
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>