mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
* choosesyntax.c (edit_syntax_dialog): Add parentheses as
suggested by gcc. * editkeys.c: Use braces in the keymap initializers.
This commit is contained in:
parent
6b874e13aa
commit
56c1ec97ad
@ -1,3 +1,9 @@
|
|||||||
|
2005-08-10 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* choosesyntax.c (edit_syntax_dialog): Add parentheses as
|
||||||
|
suggested by gcc.
|
||||||
|
* editkeys.c: Use braces in the keymap initializers.
|
||||||
|
|
||||||
2005-07-27 Leonard den Ottolander <leonard den ottolander nl>
|
2005-07-27 Leonard den Ottolander <leonard den ottolander nl>
|
||||||
|
|
||||||
* choosesyntax.c: Add option to reload current syntax.
|
* choosesyntax.c: Add option to reload current syntax.
|
||||||
|
@ -85,9 +85,9 @@ edit_syntax_dialog (void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Load or unload syntax rules if the option has changed */
|
/* Load or unload syntax rules if the option has changed */
|
||||||
if (option_auto_syntax && !old_auto_syntax || old_auto_syntax ||
|
if ((option_auto_syntax && !old_auto_syntax) || old_auto_syntax ||
|
||||||
old_syntax_type && option_syntax_type &&
|
(old_syntax_type && option_syntax_type &&
|
||||||
(strcmp (old_syntax_type, option_syntax_type) != 0) ||
|
(strcmp (old_syntax_type, option_syntax_type) != 0)) ||
|
||||||
force_reload)
|
force_reload)
|
||||||
edit_load_syntax (wedit, NULL, option_syntax_type);
|
edit_load_syntax (wedit, NULL, option_syntax_type);
|
||||||
|
|
||||||
|
214
edit/editkeys.c
214
edit/editkeys.c
@ -49,130 +49,130 @@
|
|||||||
* when the key is assigned to more than one command.
|
* when the key is assigned to more than one command.
|
||||||
*/
|
*/
|
||||||
static const edit_key_map_type cooledit_key_map[] = {
|
static const edit_key_map_type cooledit_key_map[] = {
|
||||||
ALT ('b'), CK_Match_Bracket,
|
{ ALT ('b'), CK_Match_Bracket },
|
||||||
ALT ('m'), CK_Mail,
|
{ ALT ('m'), CK_Mail },
|
||||||
XCTRL ('f'), CK_Save_Block,
|
{ XCTRL ('f'), CK_Save_Block },
|
||||||
XCTRL ('n'), CK_New,
|
{ XCTRL ('n'), CK_New },
|
||||||
XCTRL ('p'), CK_Pipe_Block (1), /* spell check */
|
{ XCTRL ('p'), CK_Pipe_Block (1) }, /* spell check */
|
||||||
XCTRL ('x'), CK_Word_Right,
|
{ XCTRL ('x'), CK_Word_Right },
|
||||||
XCTRL ('y'), CK_Delete_Line,
|
{ XCTRL ('y'), CK_Delete_Line },
|
||||||
XCTRL ('z'), CK_Word_Left,
|
{ XCTRL ('z'), CK_Word_Left },
|
||||||
0, 0
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const edit_key_map_type emacs_key_map[] = {
|
static const edit_key_map_type emacs_key_map[] = {
|
||||||
ALT ('$'), CK_Pipe_Block (1), /* spell check */
|
{ ALT ('$'), CK_Pipe_Block (1) }, /* spell check */
|
||||||
ALT ('b'), CK_Word_Left,
|
{ ALT ('b'), CK_Word_Left },
|
||||||
ALT ('f'), CK_Word_Right,
|
{ ALT ('f'), CK_Word_Right },
|
||||||
ALT ('v'), CK_Page_Up,
|
{ ALT ('v'), CK_Page_Up },
|
||||||
ALT ('w'), CK_XStore,
|
{ ALT ('w'), CK_XStore },
|
||||||
XCTRL ('@'), CK_Mark,
|
{ XCTRL ('@'), CK_Mark },
|
||||||
XCTRL ('a'), CK_Home,
|
{ XCTRL ('a'), CK_Home },
|
||||||
XCTRL ('b'), CK_Left,
|
{ XCTRL ('b'), CK_Left },
|
||||||
XCTRL ('e'), CK_End,
|
{ XCTRL ('e'), CK_End },
|
||||||
XCTRL ('f'), CK_Right,
|
{ XCTRL ('f'), CK_Right },
|
||||||
XCTRL ('g'), CK_Ignore_Key,
|
{ XCTRL ('g'), CK_Ignore_Key },
|
||||||
XCTRL ('n'), CK_Down,
|
{ XCTRL ('n'), CK_Down },
|
||||||
XCTRL ('p'), CK_Up,
|
{ XCTRL ('p'), CK_Up },
|
||||||
XCTRL ('s'), CK_Find,
|
{ XCTRL ('s'), CK_Find },
|
||||||
XCTRL ('v'), CK_Page_Down,
|
{ XCTRL ('v'), CK_Page_Down },
|
||||||
XCTRL ('w'), CK_XCut,
|
{ XCTRL ('w'), CK_XCut },
|
||||||
XCTRL ('y'), CK_XPaste,
|
{ XCTRL ('y'), CK_XPaste },
|
||||||
0, 0
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const edit_key_map_type common_key_map[] = {
|
static const edit_key_map_type common_key_map[] = {
|
||||||
'\n', CK_Enter,
|
{ '\n', CK_Enter },
|
||||||
'\t', CK_Tab,
|
{ '\t', CK_Tab },
|
||||||
|
|
||||||
ESC_CHAR, CK_Exit,
|
{ ESC_CHAR, CK_Exit },
|
||||||
KEY_BACKSPACE, CK_BackSpace,
|
{ KEY_BACKSPACE, CK_BackSpace },
|
||||||
KEY_DC, CK_Delete,
|
{ KEY_DC, CK_Delete },
|
||||||
KEY_DOWN, CK_Down,
|
{ KEY_DOWN, CK_Down },
|
||||||
KEY_END, CK_End,
|
{ KEY_END, CK_End },
|
||||||
KEY_HOME, CK_Home,
|
{ KEY_HOME, CK_Home },
|
||||||
KEY_IC, CK_Toggle_Insert,
|
{ KEY_IC, CK_Toggle_Insert },
|
||||||
KEY_LEFT, CK_Left,
|
{ KEY_LEFT, CK_Left },
|
||||||
KEY_NPAGE, CK_Page_Down,
|
{ KEY_NPAGE, CK_Page_Down },
|
||||||
KEY_PPAGE, CK_Page_Up,
|
{ KEY_PPAGE, CK_Page_Up },
|
||||||
KEY_RIGHT, CK_Right,
|
{ KEY_RIGHT, CK_Right },
|
||||||
KEY_UP, CK_Up,
|
{ KEY_UP, CK_Up },
|
||||||
|
|
||||||
ALT ('\n'), CK_Return,
|
{ ALT ('\n'), CK_Return },
|
||||||
ALT ('\t'), CK_Complete_Word,
|
{ ALT ('\t'), CK_Complete_Word },
|
||||||
ALT ('l'), CK_Goto,
|
{ ALT ('l'), CK_Goto },
|
||||||
ALT ('L'), CK_Goto,
|
{ ALT ('L'), CK_Goto },
|
||||||
ALT ('p'), CK_Paragraph_Format,
|
{ ALT ('p'), CK_Paragraph_Format },
|
||||||
ALT ('t'), CK_Sort,
|
{ ALT ('t'), CK_Sort },
|
||||||
ALT ('u'), CK_ExtCmd,
|
{ ALT ('u'), CK_ExtCmd },
|
||||||
ALT ('<'), CK_Beginning_Of_Text,
|
{ ALT ('<'), CK_Beginning_Of_Text },
|
||||||
ALT ('>'), CK_End_Of_Text,
|
{ ALT ('>'), CK_End_Of_Text },
|
||||||
ALT (KEY_BACKSPACE), CK_Delete_Word_Left,
|
{ ALT (KEY_BACKSPACE), CK_Delete_Word_Left },
|
||||||
|
|
||||||
XCTRL ('k'), CK_Delete_To_Line_End,
|
{ XCTRL ('k'), CK_Delete_To_Line_End },
|
||||||
XCTRL ('l'), CK_Refresh,
|
{ XCTRL ('l'), CK_Refresh },
|
||||||
XCTRL ('o'), CK_Shell,
|
{ XCTRL ('o'), CK_Shell },
|
||||||
XCTRL ('u'), CK_Undo,
|
{ XCTRL ('u'), CK_Undo },
|
||||||
XCTRL ('t'), CK_Select_Codepage,
|
{ XCTRL ('t'), CK_Select_Codepage },
|
||||||
XCTRL ('q'), CK_Insert_Literal,
|
{ XCTRL ('q'), CK_Insert_Literal },
|
||||||
XCTRL ('a'), CK_Execute_Macro,
|
{ XCTRL ('a'), CK_Execute_Macro },
|
||||||
XCTRL ('r'), CK_Begin_End_Macro,
|
{ XCTRL ('r'), CK_Begin_End_Macro },
|
||||||
|
|
||||||
KEY_F (1), CK_Help,
|
{ KEY_F (1), CK_Help },
|
||||||
KEY_F (2), CK_Save,
|
{ KEY_F (2), CK_Save },
|
||||||
KEY_F (3), CK_Mark,
|
{ KEY_F (3), CK_Mark },
|
||||||
KEY_F (4), CK_Replace,
|
{ KEY_F (4), CK_Replace },
|
||||||
KEY_F (5), CK_Copy,
|
{ KEY_F (5), CK_Copy },
|
||||||
KEY_F (6), CK_Move,
|
{ KEY_F (6), CK_Move },
|
||||||
KEY_F (7), CK_Find,
|
{ KEY_F (7), CK_Find },
|
||||||
KEY_F (8), CK_Remove,
|
{ KEY_F (8), CK_Remove },
|
||||||
KEY_F (10), CK_Exit,
|
{ KEY_F (10), CK_Exit },
|
||||||
KEY_F (11), CK_User_Menu, /* edit user menu */
|
{ KEY_F (11), CK_User_Menu }, /* edit user menu */
|
||||||
KEY_F (12), CK_Save_As,
|
{ KEY_F (12), CK_Save_As },
|
||||||
KEY_F (13), CK_Column_Mark,
|
{ KEY_F (13), CK_Column_Mark },
|
||||||
KEY_F (14), CK_Replace_Again,
|
{ KEY_F (14), CK_Replace_Again },
|
||||||
KEY_F (15), CK_Insert_File,
|
{ KEY_F (15), CK_Insert_File },
|
||||||
KEY_F (17), CK_Find_Again,
|
{ KEY_F (17), CK_Find_Again },
|
||||||
KEY_F (19), CK_Pipe_Block (0), /* C formatter */
|
{ KEY_F (19), CK_Pipe_Block (0) }, /* C formatter */
|
||||||
|
|
||||||
/* Shift */
|
/* Shift */
|
||||||
KEY_M_SHIFT | KEY_PPAGE, CK_Page_Up_Highlight,
|
{ KEY_M_SHIFT | KEY_PPAGE, CK_Page_Up_Highlight },
|
||||||
KEY_M_SHIFT | KEY_NPAGE, CK_Page_Down_Highlight,
|
{ KEY_M_SHIFT | KEY_NPAGE, CK_Page_Down_Highlight },
|
||||||
KEY_M_SHIFT | KEY_LEFT, CK_Left_Highlight,
|
{ KEY_M_SHIFT | KEY_LEFT, CK_Left_Highlight },
|
||||||
KEY_M_SHIFT | KEY_RIGHT, CK_Right_Highlight,
|
{ KEY_M_SHIFT | KEY_RIGHT, CK_Right_Highlight },
|
||||||
KEY_M_SHIFT | KEY_UP, CK_Up_Highlight,
|
{ KEY_M_SHIFT | KEY_UP, CK_Up_Highlight },
|
||||||
KEY_M_SHIFT | KEY_DOWN, CK_Down_Highlight,
|
{ KEY_M_SHIFT | KEY_DOWN, CK_Down_Highlight },
|
||||||
KEY_M_SHIFT | KEY_HOME, CK_Home_Highlight,
|
{ KEY_M_SHIFT | KEY_HOME, CK_Home_Highlight },
|
||||||
KEY_M_SHIFT | KEY_END, CK_End_Highlight,
|
{ KEY_M_SHIFT | KEY_END, CK_End_Highlight },
|
||||||
KEY_M_SHIFT | KEY_IC, CK_XPaste,
|
{ KEY_M_SHIFT | KEY_IC, CK_XPaste },
|
||||||
KEY_M_SHIFT | KEY_DC, CK_XCut,
|
{ KEY_M_SHIFT | KEY_DC, CK_XCut },
|
||||||
KEY_M_SHIFT | '\n', CK_Return, /* useful for pasting multiline text */
|
{ KEY_M_SHIFT | '\n', CK_Return }, /* useful for pasting multiline text */
|
||||||
|
|
||||||
/* Ctrl */
|
/* Ctrl */
|
||||||
KEY_M_CTRL | (KEY_F (2)), CK_Save_As,
|
{ KEY_M_CTRL | (KEY_F (2)), CK_Save_As },
|
||||||
KEY_M_CTRL | (KEY_F (4)), CK_Replace_Again,
|
{ KEY_M_CTRL | (KEY_F (4)), CK_Replace_Again },
|
||||||
KEY_M_CTRL | (KEY_F (7)), CK_Find_Again,
|
{ KEY_M_CTRL | (KEY_F (7)), CK_Find_Again },
|
||||||
KEY_M_CTRL | KEY_BACKSPACE, CK_Undo,
|
{ KEY_M_CTRL | KEY_BACKSPACE, CK_Undo },
|
||||||
KEY_M_CTRL | KEY_PPAGE, CK_Beginning_Of_Text,
|
{ KEY_M_CTRL | KEY_PPAGE, CK_Beginning_Of_Text },
|
||||||
KEY_M_CTRL | KEY_NPAGE, CK_End_Of_Text,
|
{ KEY_M_CTRL | KEY_NPAGE, CK_End_Of_Text },
|
||||||
KEY_M_CTRL | KEY_HOME, CK_Beginning_Of_Text,
|
{ KEY_M_CTRL | KEY_HOME, CK_Beginning_Of_Text },
|
||||||
KEY_M_CTRL | KEY_END, CK_End_Of_Text,
|
{ KEY_M_CTRL | KEY_END, CK_End_Of_Text },
|
||||||
KEY_M_CTRL | KEY_UP, CK_Scroll_Up,
|
{ KEY_M_CTRL | KEY_UP, CK_Scroll_Up },
|
||||||
KEY_M_CTRL | KEY_DOWN, CK_Scroll_Down,
|
{ KEY_M_CTRL | KEY_DOWN, CK_Scroll_Down },
|
||||||
KEY_M_CTRL | KEY_LEFT, CK_Word_Left,
|
{ KEY_M_CTRL | KEY_LEFT, CK_Word_Left },
|
||||||
KEY_M_CTRL | KEY_RIGHT, CK_Word_Right,
|
{ KEY_M_CTRL | KEY_RIGHT, CK_Word_Right },
|
||||||
KEY_M_CTRL | KEY_IC, CK_XStore,
|
{ KEY_M_CTRL | KEY_IC, CK_XStore },
|
||||||
KEY_M_CTRL | KEY_DC, CK_Remove,
|
{ KEY_M_CTRL | KEY_DC, CK_Remove },
|
||||||
|
|
||||||
/* Ctrl + Shift */
|
/* Ctrl + Shift */
|
||||||
KEY_M_SHIFT | KEY_M_CTRL | KEY_PPAGE, CK_Beginning_Of_Text_Highlight,
|
{ KEY_M_SHIFT | KEY_M_CTRL | KEY_PPAGE, CK_Beginning_Of_Text_Highlight },
|
||||||
KEY_M_SHIFT | KEY_M_CTRL | KEY_NPAGE, CK_End_Of_Text_Highlight,
|
{ KEY_M_SHIFT | KEY_M_CTRL | KEY_NPAGE, CK_End_Of_Text_Highlight },
|
||||||
KEY_M_SHIFT | KEY_M_CTRL | KEY_LEFT, CK_Word_Left_Highlight,
|
{ KEY_M_SHIFT | KEY_M_CTRL | KEY_LEFT, CK_Word_Left_Highlight },
|
||||||
KEY_M_SHIFT | KEY_M_CTRL | KEY_RIGHT, CK_Word_Right_Highlight,
|
{ KEY_M_SHIFT | KEY_M_CTRL | KEY_RIGHT, CK_Word_Right_Highlight },
|
||||||
KEY_M_SHIFT | KEY_M_CTRL | KEY_UP, CK_Scroll_Up_Highlight,
|
{ KEY_M_SHIFT | KEY_M_CTRL | KEY_UP, CK_Scroll_Up_Highlight },
|
||||||
KEY_M_SHIFT | KEY_M_CTRL | KEY_DOWN, CK_Scroll_Down_Highlight,
|
{ KEY_M_SHIFT | KEY_M_CTRL | KEY_DOWN, CK_Scroll_Down_Highlight },
|
||||||
|
|
||||||
0, 0
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user