...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>
(check_is_cd): fix of cd command check.
Type accuracy: check_is_cd() now returns gboolean instead of int.
Initialize start and end variables.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
steps to reproduce:
mcview_remember_file_position=1
test file: file1.ext
123
456
123
qwe
123
123
qwe
123
qwe
456
1) open file1.ext in mcedit search text 'qwe'
2) close file1.ext
3) open file1.ext in mcview
4) close file1.ext
5) reopen file1.ext in mcedit and search again text 'qwe'
search position is reset but should not be reset.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
In mcedit, when the selected text is copied to the clipboard, the selection disappears.
This behavior contradicts to the traditional behavior of all modern text editors and is highly annoying.
Now selection don't reset after the text is copied into the clipboard.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Viewer Goto dialog doesn't allow go to the specified offset. The value
of input line is rounded to the next line start. Such bevaviour
is useless in hex mode of viewer. In hex mode we must heve a
capability to go to the specified address as is without any round.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>