[geany/geany] 63eaf2: keybindings: Added missing "Strip Trailing Spaces" (#1806)
LarsGit223
git-noreply at xxxxx
Sun Jul 15 21:53:01 UTC 2018
Branch: refs/heads/master
Author: LarsGit223 <LarsGit223 at users.noreply.github.com>
Committer: elextr <elextr at gmail.com>
Date: Sun, 15 Jul 2018 21:53:01 UTC
Commit: 63eaf257ded7120fe06b9d099a5ffc7241a3a281
https://github.com/geany/geany/commit/63eaf257ded7120fe06b9d099a5ffc7241a3a281
Log Message:
-----------
keybindings: Added missing "Strip Trailing Spaces" (#1806)
Fixes #395.
Modified Paths:
--------------
src/keybindings.c
src/keybindings.h
src/plugindata.h
Modified: src/keybindings.c
5 lines changed, 5 insertions(+), 0 deletions(-)
===================================================================
@@ -666,6 +666,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,
@@ -2632,6 +2634,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;
}
Modified: src/keybindings.h
2 lines changed, 2 insertions(+), 0 deletions(-)
===================================================================
@@ -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 (API 238) */
GEANY_KEYS_COUNT /* must not be used by plugins */
};
Modified: src/plugindata.h
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -59,7 +59,7 @@ G_BEGIN_DECLS
* @warning You should not test for values below 200 as previously
* @c GEANY_API_VERSION was defined as an enum value, not a macro.
*/
-#define GEANY_API_VERSION 237
+#define GEANY_API_VERSION 238
/* hack to have a different ABI when built with GTK3 because loading GTK2-linked plugins
* with GTK3-linked Geany leads to crash */
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list