Since mc-4.7.0-pre1 was added charset confirmation if charset was changed.
This commit was adds automatic recognize of system charset and fix in current
config. Also, now contig file will untouched if 'Auto save setup' option is switched off.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
* 212_buttonbar_commands: (23 commits)
Added shortcuts to move to begin and end of text in editor.
Fixed generation of shortcut string for menu items.
Fixed CK_Menu command handling in editor.
Many shortcuts were fixed.
Ticket #1824: fixed some keybinding names
Modified ButtonBar engine to allow bind keys to unused buttons.
Unified some commands that differ in its behaviour when called via menu or shortcuts.
Added Esc key to the key name table.
Implemented keybindings engine for ButtonBar (F1-F10 keys).
Modified menu command handling using DLG_ACTION message.
Modified dialog callback function.
Implemented keybindings for Help window.
Optimization of command handling.
Added Viewer commands and shortcuts.
ButtonBar optimizations.
Added missed shortcuts for ButtonBar commands.
Type accuracy and code clean up.
Enlarged sizes of Directory Tree dialog window.
Implemeted keybindings for Tree widget
Changed widget order in editor and viewer dialogs.
...
Ticket #1764:
* fxed shortcuts for select/unselect/reverse selection
of file group;
* removed 'C-x C-c' default shortcut for Quit command.
Also fixed some emacs-like keybindings for editor and viewer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Added two parameters:
* Widget *sender -- to recognize the wiget that have sent message;
* void *data -- to pass any user-defined data to the dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
First step: renamed type of dialog command execution function.
Made execution function more flexible: added parameters for
sender and receiver widgets and user data.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Testase:
* rm -f ~/.mc/Tree
* run mc
* F9 -> Command -> Directory tree
* Press F2
* Go to '/lib' item
* Press F2
* exit from mc
* run mc again
* F9 -> Command -> Directory tree
* press HOME key
Fix issue:
changed forgotten variable name.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
After implementation of keybinding engine and reimplenetation
of menu engine, MC starts very slow due to multiple trivial
(totally non optimized) search of many values in many arrays.
This patch performes the some speedup of MC startup process.
Statistics:
- startup time without the patch: 0m0.413s
- startup time with the patch: 0m0.073s
Great thanks to 0xe2.0x9a.0x9b for the original patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
fixed segfault in backward_word (widget.c)
...
The for loop, whose purpose is to remove exactly 1 character
(hence I don't get why it's a loop, but nevermind) was not UTF8-ready.
So if the character preceding the cursor was an accented one,
it jumped to the middle of the UTF-8 sequence, causing the rest of
the stuff go unpredictable.
Although it *should* never happen (which, as we all know,
does not equal to "never happens"), in this case "p" simply jumped
over "in->buffer". The function has a "p != in->buffer" check three times,
it might it more robust if you replaced that with "p >= in->buffer".
This should prevent the segfault, and just stay with a slightly buggy but
otherwise harmless alt-backspace behavior, should there be any UTF-8 or
similar bugs left. This change is not included in my patch.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
When pasting multiline text with shift+mouse newline characters
are lost. Pasted text is not shown before any key is pressed.
Middle-mouse pasting in mc requires shift being pressed to keep mc
from interpreting the button press itself, so it is passing on to
xterm/gpm. That has the nice side effect that the pasted enter
characters are automatically shift-enter, which was simply interpreted
as newline-without-autoindent. However, the keybinding for shift-enter
have been lost in the course of #212 - it simply does nothing,
and consequently text is pasted without newlines.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>