Skip to content

Commit

Permalink
keybindings: Added missing "Strip Trailing Spaces"
Browse files Browse the repository at this point in the history
Fixes geany#395.
  • Loading branch information
lpaulsen93 committed Mar 15, 2018
1 parent e4bc8c3 commit e7937ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/keybindings.c
Expand Up @@ -665,6 +665,8 @@ static void init_default_kb(void)
0, 0, "menu_linebreak", _("Toggle Line breaking"), "line_breaking1");
add_kb(group, GEANY_KEYS_DOCUMENT_CLONE, NULL,
0, 0, "menu_clone", _("_Clone"), "clone1");
add_kb(group, GEANY_KEYS_DOCUMENT_STRIPTRAILINGSPACES, NULL,
0, 0, "menu_strip_trailing_spaces", _("_Strip Trailing Spaces"), "strip_trailing_spaces1");
add_kb(group, GEANY_KEYS_DOCUMENT_REPLACETABS, NULL,
0, 0, "menu_replacetabs", _("Replace tabs with space"), "menu_replace_tabs");
add_kb(group, GEANY_KEYS_DOCUMENT_REPLACESPACES, NULL,
Expand Down Expand Up @@ -2626,6 +2628,9 @@ static gboolean cb_func_document_action(guint key_id)
on_remove_markers1_activate(NULL, NULL);
on_menu_remove_indicators1_activate(NULL, NULL);
break;
case GEANY_KEYS_DOCUMENT_STRIPTRAILINGSPACES:
editor_strip_trailing_spaces(doc->editor, FALSE);
break;
}
return TRUE;
}
Expand Down
2 changes: 2 additions & 0 deletions src/keybindings.h
Expand Up @@ -274,6 +274,8 @@ enum GeanyKeyBindingID
GEANY_KEYS_FORMAT_SENDTOCMD8, /**< Keybinding. */
GEANY_KEYS_FORMAT_SENDTOCMD9, /**< Keybinding. */
GEANY_KEYS_EDITOR_DELETELINETOBEGINNING, /**< Keybinding. */
GEANY_KEYS_DOCUMENT_STRIPTRAILINGSPACES, /**< Keybinding.
* @since 1.34 */
GEANY_KEYS_COUNT /* must not be used by plugins */
};

Expand Down

0 comments on commit e7937ff

Please sign in to comment.