From c3755f0c50c20578196a73b97996f55fe3d1b678 Mon Sep 17 00:00:00 2001 From: Ilia Maslakov Date: Sun, 3 Jan 2010 01:58:35 +0000 Subject: [PATCH] added keybind CK_Toggle_Show_Margin for toggle show right margin (with empty default key) added new color pair for right margin (editrightmargin) into skins Signed-off-by: Ilia Maslakov --- edit/edit.c | 5 +++++ misc/mc.keymap.default | 1 + misc/mc.keymap.emacs | 1 + misc/skins/default.ini | 2 +- misc/skins/double-lines.ini | 2 +- misc/skins/featured.ini | 1 + misc/skins/gotar.ini | 1 + src/cmddef.h | 1 + src/keybind.c | 1 + 9 files changed, 13 insertions(+), 2 deletions(-) diff --git a/edit/edit.c b/edit/edit.c index 235fc8af3..b8af0a361 100644 --- a/edit/edit.c +++ b/edit/edit.c @@ -2936,6 +2936,11 @@ edit_execute_cmd (WEdit *edit, unsigned long command, int char_for_insertion) edit->force |= REDRAW_PAGE; break; + case CK_Toggle_Show_Margin: + show_right_margin = !show_right_margin; + edit->force |= REDRAW_PAGE; + break; + case CK_Toggle_Bookmark: book_mark_clear (edit, edit->curs_line, BOOK_MARK_FOUND_COLOR); if (book_mark_query_color (edit, edit->curs_line, BOOK_MARK_COLOR)) diff --git a/misc/mc.keymap.default b/misc/mc.keymap.default index 4494dfa63..9238a24bc 100644 --- a/misc/mc.keymap.default +++ b/misc/mc.keymap.default @@ -150,6 +150,7 @@ EditDeleteMacro = EditToggleLineState = alt-n EditToggleTabTWS = alt-underline EditToggleSyntax = ctrl-s +EditToggleShowMargin = EditFindDefinition = alt-enter EditLoadPrevFile = alt-minus diff --git a/misc/mc.keymap.emacs b/misc/mc.keymap.emacs index 0d9b25549..031ab5d84 100644 --- a/misc/mc.keymap.emacs +++ b/misc/mc.keymap.emacs @@ -148,6 +148,7 @@ EditDeleteMacro = EditToggleLineState = alt-n EditToggleTabTWS = alt-underline EditToggleSyntax = ctrl-s +EditToggleShowMargin = EditFindDefinition = alt-enter EditLoadPrevFile = alt-minus diff --git a/misc/skins/default.ini b/misc/skins/default.ini index b1c1219c3..ced155cc3 100644 --- a/misc/skins/default.ini +++ b/misc/skins/default.ini @@ -78,7 +78,7 @@ linestate=white;cyan bookmark=white;red bookmarkfound=black;green - editbeyondwrap=brightblue;black + editrightmargin=brightblue;black [viewer] viewunderline=brightred;blue diff --git a/misc/skins/double-lines.ini b/misc/skins/double-lines.ini index 3f571aaad..b514af906 100644 --- a/misc/skins/double-lines.ini +++ b/misc/skins/double-lines.ini @@ -74,7 +74,7 @@ linestate=white;cyan bookmark=white;red bookmarkfound=black;green - editbeyondwrap=brightblue;black + editrightmargin=brightblue;black [viewer] viewunderline=brightred;blue diff --git a/misc/skins/featured.ini b/misc/skins/featured.ini index d9f288596..fc729c7fe 100644 --- a/misc/skins/featured.ini +++ b/misc/skins/featured.ini @@ -80,6 +80,7 @@ linestate=white;cyan bookmark=white;red bookmarkfound=black;green + editrightmargin=brightblue;black [viewer] viewunderline=brightred;blue diff --git a/misc/skins/gotar.ini b/misc/skins/gotar.ini index 394ca97b7..2639bee50 100644 --- a/misc/skins/gotar.ini +++ b/misc/skins/gotar.ini @@ -73,6 +73,7 @@ linestate=brightgreen bookmark=white;red bookmarkfound=black;green + editrightmargin=brightblue;blue [viewer] viewunderline=brightgreen;black diff --git a/src/cmddef.h b/src/cmddef.h index 594223eb2..bb57de405 100644 --- a/src/cmddef.h +++ b/src/cmddef.h @@ -128,6 +128,7 @@ #define CK_Maximize 458 #endif +#define CK_Toggle_Show_Margin 460 #define CK_Toggle_Tab_TWS 470 #define CK_Toggle_Syntax 480 #define CK_Toggle_Line_State 490 diff --git a/src/keybind.c b/src/keybind.c index 6b9339609..e6e605f61 100644 --- a/src/keybind.c +++ b/src/keybind.c @@ -189,6 +189,7 @@ static name_keymap_t command_names[] = { { "EditToggleLineState", CK_Toggle_Line_State }, { "EditToggleTabTWS", CK_Toggle_Tab_TWS }, { "EditToggleSyntax", CK_Toggle_Syntax }, + { "EditToggleShowMargin", CK_Toggle_Show_Margin }, { "EditFindDefinition", CK_Find_Definition }, { "EditLoadPrevFile", CK_Load_Prev_File }, { "EditLoadNextFile", CK_Load_Next_File }, -- 2.11.4.GIT