Environment variable should not be substituted if escaping of dollar
sign is used: \$VAR.
Initial steps:
(do_cd): changed return type from int to gboolean.
(examine_cd): likewise and some cleanup.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The bug only occurs with subshell enabled.
When resizing the window while in the viewer, the subshell resizes
itself and hence prints its prompt again. This is captured and processed
by mc.
src/filemanager/layout.c:setup_panels() is executed and recalculates
properties of the panel, but for some reason this time mc_prompt does
contain all the invisible characters, they are not stripped off, hence
size calculation goes wrong.
Thanks Egmont Koblinger for the detailed description of the problem and
the idea of fix.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
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>
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>
* 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>
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>
Panel state is saved in ~/.mc/panels.ini:
1) when "Save setup" command is invoked;
or
2) when MC is quited and "Auto save panels setup" option is set.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
...to provide symmetrical usage of init/deinit functions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
All file panels related stuff was moved to midnight.[ch].
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
menubar_set_visible(): new function to get rid of menubar_visible global variable
in widgtes library.
menu_set_name(): new function to avoid total recreation of main menu
after change panel layout.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Midnight Commander's color/skin engine often reuses the same color definition for multiple elements on the UI.
This unnecessarily limits the possibilities when playing with colors.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The following functions:
directory_history_add
directory_history_next
directory_history_prev
directory_history_list
get_parent_dir_name
_do_panel_cd
do_panel_cd
were moved from main.[ch] to screen.c and panel.h.
Type accuracy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Removed mcserver and mcfs support.
Reasons:
(1) no longer builds
(2) no one is willing to support it
(3) possibly contains unfixed security holes
(4) makes no sense in view of the availability of FISH
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Fixed a typo (clipbord -> clipboard) in the code and man pages. Luckily,
mc.ini key name is unaffected.
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Check and correct value of option_tab_spacing during options loading.
Check and correct value of option_word_wrap_line_length during options loading
and after editor options changing.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
added params clipbord_store, clipbord_paste into [Misc] section.
created src/clipbord.[ch]
added copy_file_to_ext_clip, paste_to_file_from_ext_clip for copy/paste
text to the global X clipboard.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Panel options are moved to new dialog.
Panel setup options are collected in a special structure.
Includes clean up.
Code indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
'Left'/'Right' menu was reorganized.
'File listing' menu item was added to fast switch file panel
to file listing mode.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Initial step: refactoring: a piece of code was moved form main.c
into args.c. Some functions and variables were renamed.
Fixed includes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Collect keybind-related variables in src/keybind.[ch] files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Split assignments and conditions. Type accuracy. Minor optimization.
Thanks Vit Rosin for original patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
added src/diffviewer/ydiff.[ch] into project tree
added entry 'View diff files' into 'Command' menu
added 'diffviewer' color pairs
fixed Makefile and configure.am
added new binding CmdDiffView into '[main]' section
Big thanx to 'Daniel Borca <dborca@yahoo.com>' for ydiff
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Added diffviewer own library
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Fixed CFLAGS for diffviewer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
changed skins, added section
[diffviewer]
added=
changedline=
changednew=
changed=
removed=
folder=
error=
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Reimplementation of hardcoded shortcuts to keybindings.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Problem description:
1. Run mc as
mc /#ftp:user@server
2. If FTP server asks password, MC shows the password dialog window.
3. If type the first symbol in input line, MC crashes.
Bug cause:
MC asks ftp password before initialize of input line keybindings.
Solution:
Reimplemented MC startup sequence.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
How to reproduce:
1) run mc
2) press F9
3) select 'Options' -> 'Configuration...'
4) switch off '[ ] Verbose operation' option
5) select '[ Save ]' button and press Enter
6) in additional, select 'F9' -> 'Options' -> 'Save setup'
7) exit from mc
8) run mc again
9) select 'F9' -> 'Options' -> 'Configuration...'
'Verbose operation' option always switched on.
This commit fixes this behaviour. But in slow terminals,
the value read form ini is forced set to 0.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Added support of autodetect codepages via 'enca' program.
New parameter in user configuration file (~/.mc/ini):
[Misc]
autodetect_codeset=(one of `enca --list languages | cut -d : -f1`)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Little code cleanup.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Type accuracy. Added missing includes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Added keybinding for switch panels view (horizontally/vertically).
Default value for keybind is
[main]
CmdTogglePanelsView = alt-comma
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Fixed warings: local variable shadows a global declaration.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
* moved src/fileloc.h into lib/fileloc.h
* moved src/timefmt.h into lib/timefmt.h
* removed unneedded includes into src/util.c
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
* moved src/global.h into lib/global.h
* moved glibcompat.[ch] from ./src/ into ./lib/
* moved fs.h from ./src/ into ./lib/
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Initial step: code refactoring:
* small code formatting;
* type accuracy;
* introduce new type 'panel_view_mode_t' for panel type.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>