* 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>
Now default key bindings are hardcoded as strings like values in keymap
file. Such presentation of key bindings allows simplify keymaps merge
when new bindings are added, replaced or removed old ones during MC
initialization.
Previously, to rebind some keys, used must redefine the entire section
where that bindings are in. New merge algorithm doesn't require the
redefinition of entire section in user's keymap file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
default_main_map and default_main_x_map renamed to
default_main_keymap and default_main_x_keymap respectively to unified
variable names.
Editor: setup keymaps only once for all editors.
Viewer: share single keymap array for all viewers.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Most of keybind names are changed to unify that names.
Details see in doc/keybind-migration.txt file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Added doc/keybind-migration.txt file to describe new keybinding names
used in mc.keymap.* files in 4.8.x series.
Cosmetics: reordering of keymap section declarations to provide identical
order totally in the source tree.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Fixed user menu behaviour. MC hangs if menu entry contains the 'read' command or something like that.
bug introduced in the Ticket #323 (changeset: 0cfbe19d96).
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
if the external script contain #interactive then do show prompt.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Now "EditPipeBlock (X)" action tries execute the
~/.local/share/mc/mcedit/macros.d/macro.X.sh script.
To bind action EditPipeBlock (X) to the any hotkey you need add this binding
into ~/.local/share/mc/mc.macros file like following:
[editor]
ctrl-Q=EditWordLeft:-1;EditWordRightHighlight:-1;EditPipeBlock:3;
ctrl-W=EditPipeBlock:1;
This means that "ctrl-W" hotkey initiates the EditPipeBlock (1) action,
editor handler translates this into execution of
~/.local/share/mc/mcedit/macros.d/macro.1.sh shell script.
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>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
some fixes
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
and one more fix
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
For example: "ctrl-w=action:code;action:code;action:code;"
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The problem:
viewing binary files contain char 0x9A leads to massive screen corruption and Search
dialog pops up with 1;2c search string (multiple times depending on actual screen contents).
So it looks like the file 'presses' F7 or / and shift-right_arrow for every specified
character combination occurrence. In case of bigger files it's impossible to exit from
such viewer, as search dialog keeps popping up after closing.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
added action CK_Mark_Word to the mark current word
changed double-click the mouse handler of the editor
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
now the cursor jump more intuitive after actions "word left"/"word right".
It will be stop before BOL, BOF
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
fixed incorrect restore selection after UNDO
test case:
1. mcedit new_empty_file
2. type in 0123456789
3. F3 5*left F3 - digit '4' is not marked at this point
4. backspace, ctrl-u - digit '4' is marked now
5. left, 2*del, 2*ctrl-u - digits '4' and '5' are not marked
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
fixed segfault after getting the previous char in utf8, if previous char's
are: 0xB1, 0xB3, 0xB6, 0xBF, 0xBC.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
"Show mini info" checkbox was moved from the "Layout" dialog window
to the "Panel options" one. Documentation was updated.
The show_mini_info global variable was transformed to the member
of panels_options_t structure.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Drop backward compatibility for global panels options. These options
are read form [Panels] section, if this section exists. If this section
is abscent, default values are used.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Instead of hardcoded (via MC_USERCONF_DIR) path mc mc now used
dynamic directories specified by environment variables:
* XDG_CONFIG_HOME - dir for config files . By default is ~/.config/mc
* XDG_DATA_HOME - dir for some data, such as user defuned Syntax file, menu etc By default is ~/.local/share/mc
* XDG_CACHE_HOME - dir for temp files, such as cooledit.clip etc. By default is ~/.cache/mc
This is mainstream standard already adopted by many projects.
Old settings will be migrated at first time from ~/.mc to these dirs.
See http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html for more info.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(paint_panel): removed. Sending of WIDGET_DRAW message is used instead.
(update_dirty_panels): moved from panel.c to midnight.c.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
(restore_into_right_dir_panel): made static.
(panel_update_cols): moved from panel.[ch] to layout.[ch].
(set_display_type): minor cleanup and type accuracy.
(panel_display_t): type accuracy
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
New "Simple panels swap" checkbox in "Panel options" configuration
dialog window. Unchecked by default.
Documentation update.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Initial step: refactoring: create new panel_sort_info_t structure
to store sort options of panel.
Type accuracy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
I suggest changing default text in filtered view (alt-!) command input line
instead current filename in panel to contents of cmdline.
It's easier to edit command line with commands like alt-tab,
alt-enter, etc., and then view the result in mcview.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
little optimization, renamed:
* variables stack* to undo_stack*
* pop_action to edit_pop_undo_action
* edit_push_action to edit_push_undo_action
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Forget the old limit of 8 background and 16 foreground colors.
From now on Midnight Commander can use all the 256 colors,
as your favorite terminal emulator supports them - or not,
in which case it's not going to stay your favorite terminal for long.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>