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>
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>
Some FTP servers like ftp.symantec.com and download.nvidia.com
do not support parameters in LIST command. They don't fail on
LIST -la ... just ignore them. So mc shows only root directory.
Always.
Steps to reproduce:
cd /#ftp:ftp.symantec.com/public
Expected result:
Content of /public/ directory shown.
Actual result:
Content of root / directory shown instead.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Currently the completion considers the word the cursor is on as a possible
completion, but this is quite annoying if the cursor is inside the word.
Such completion effectively inserts the rest of the word one more time, so
CamelCase becomes CamelCaseCase. If this is the only match, it completes
automatically, which is even worse. The current word shouldn't be used
for completion.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
If we copy the files to the partition mounted with sshfs,
the default checkbox "preserve Attributes" is unchecked.
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>
The edit_insert_column_of_text() function is used only in
src/editor/editcmd.c file. Now it is static.
Removed unneeded forward declarations.
Moved static functions to static area in src/editor/editcmd.c
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Following fuctions are used in in src/editor/edit.c file only:
edit_print_string
edit_move_block_to_right
edit_move_block_to_left
They was moved from src/editor/editcmd.c into src/editor/edit.c
and made static.
insert_spaces_tab() is used in src/editor/edit.c. Not it is static. Also
some optimization was performed.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Following fuctions are used in in src/editor/edit.c file only:
edit_get_byte_ptr
edit_get_buf_ptr
edit_get_prev_utf
Now they are static.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Steps to reproduce:
* configure & compile mc with '--enable-charset' option;
* run mc
* go to dir with any of *.zip, *.rpm, *.deb, *.patch/diff files
* Change path encoding to any other by pressing ALT+e (selected encoding should be dfferent to system encoding)
* try to enter to archive
You'll se error message from extfs module.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
If you are in hex viewer mode and viewer remembers file positions, the
viewer restores the start position, but does not restore the position
of cursor.
So the restored position is basically useless in hex mode, because when
you move cursor, you go back to the beginning of file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Steps to reproduce:
* run ssh daemon on your host;
* run mc;
* type cd sh://127.0.0.1;
* type your password;
* just one panel was shown, after pressing ctrl+r second panel will shown as well.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
fixed fish-script 'get'.
Steps to reproduce:
create lot of small files
try to copy these files throught FISH VFS
mc hangs
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
editcmd.c:1104:42: warning: use of logical && with constant operand;
switch to bitwise & or remove constant [-Wconstant-logical-operand]
if (*num == MAX_WORD_COMPLETIONS && MAX_WORD_COMPLETIONS)
^ ~~~~~~~~~~~~~~~~~~~~
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>
The problem: extracting deep files from an archive containing long directory/file
names, filenames are cut off at 100 characters (length of the whole path
inside the archive).
In general, the TarVFS is scheduled for total reimplementation. But this
fix is useful for stable releases.
Thanks AVFS (avf.sf.net) for the code of this fix.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Extended shortcuts like 'ctrl-x ctrl-x' or 'ctrl-x alt-x' are available
in editor, but 'ctrl-x x' are not.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
After Find file -> Panelize files are shown with order of being found
and sorting mode of current panel is not applied.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
1. do follow:
diff -BurpN file1.c file.c > my.patch;
diff -BurpN file2.c file.c >> my.patch;
2. we see two file.c.diff entries within patchfs.
after apply commit, we have one combined patch-file.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
added new extfs plugin - gitfs
used prefix [git] for identification as a #changesetfs
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
When Backspace key is mapped to CdParentSmart action,
it changes directory to the parent one in QuickSearch mode instead of
delete the previous symbol in qsearch buffer.
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>
Broken left arrow (of lynx-like motion) from panelization of directories
having files only (without any subdirs).
Steps to reproduce:
1. mkdir -p a/{b/c,d}
2. touch a/d/e
3. cd a/b
4. mc
5. alt-shift-/ enter l left - selection points to 'b' directory (as it should)
6. down, enter, alt-shift-/ enter l left - selection points to '..' instead of 'd'
Now, if user enters the relative path in "Start at": input line in "Find File"
dialog window, the relative paths are used in panelization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Several extfs scripts (notably iso9660) don't work on linux
distributions using dash as the default shell. This patch
fixes all current problems in extfs reported by checkbashisms
utility.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Accented characters in bold (yellow) text are displayed incorrectly:
the letter, followed by a dot, then the letter once again, all in white.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
When you press F7 in mcview to repeat the previous search, it starts again from the
file offset that is 3 bytes after the beginning of the current match. This introduces
weird and clearly buggy symptoms. Couple of examples:
If the file contains
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
and you search for a single x character, and you keep on pressing F7,
every third character gets highlighted.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
added actions for mark files in the panel by shift-left/shift-right
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
* Removed vfs_path_element_t->raw_url_str;
* Changed some VFS prefixes (colon now used when need to split VFS prefix and VFS parameters);
* Removed vfs_translate_url() functions and related code;
* added converter of VFS parameters to string representation.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
* completed vfs_path_from_str();
* completed vfs_path_to_str() and vfs_path_to_str_elements_count();
* removed deprecated vfs_split();
* changes in all related code;
* new unit tests.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Created vfs_url_t structure
...and use it to parse and store network VFS options.
vfs_s_super structure now has a special member for network VFS options.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Formerly, each widget loaded its history self in its constructor.
Thus, history file was read as many times as many widgets with history
are in dialog.
Now all widget histories are read from ${XDG_CACHE_HOME}/mc/history
file at one time after dialog initialization.
The ev_history_load_save_t event is apllied to load histories.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Formerly, each widget saved its history self in WIDGET_DESTROY stage.
Thus, history file was read and written as many times as many widgets
with history are in dialog.
Now all widget histories are written to ${XDG_CACHE_HOME}/mc/history
file at one time before dialog destruction.
An ev_history_load_save_t event type is created to use new event engine
to save histories.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
...to some in-memory created config without write it to file.
(history_put): now uses history_save().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The problem: when mc quits with auto-save setup, the main confguration
file is written 4 times.
The solution: don't write ini when some part of setup is saved. Write
ini only after save whole confguration.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
What steps will reproduce the problem?
* View some text (log) file (F3), or edit (F4).
* Open search dialog (F7).
* Enter string starting with space and ending with space (I used " ERROR " without quotes), press Enter
* Press F7 to open search dialog again.
What is the expected output?
* Original string in search dialog (" ERROR " without quotes)
What do you see instead?
* "ERROR " (without leading space!)
What solution?
* In function mc_config_set_string_raw() use g_key_file_set_string() instead of g_key_file_set_value()
* change src/learn.c for handle new behavior
* write some tests for new behavior
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
What steps will reproduce the problem?
1) activate left panel
2) start mark files by mouse right button
3) drag cursor into right panel
What is the expected output?
files are not marked in the right panel
What do you see instead?
files are marked in the right panel. it is not correct
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Use GList for list of vfs_s_super objects in vfs_s_subclass.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Added -F option (AKA --datadir-info) for show extended information about used data dirs
display info about default used paths by 'mc -V'
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Added support of skip all failures on file/dir operations.
Original patch was created by me <me 0xn0 de> and modified by Thomas
Zajic <zlatko gmx at>.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
cd to "~" or "~" with subdirs may fail when issued from the in the command
line if more than one space is separating the "cd" and "~". So, "cd<one space>~" works,
but "cd<multiple spaces>~" fails.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
some fixes
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
...instead of direct access to panels in VGS GC.
Inlcudes clean up.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
* moved from lib/vfs/mc-vfs to lib/vfs;
* split by directories for VFS-plugins and moved to src/vfs;
* lib/vfs/vfs-impl.h was merged into lib/vfs/vfs.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>