Skip to content

Commit

Permalink
Merge pull request #1212 from eht16/addons_fix_wordwrap_kb_count
Browse files Browse the repository at this point in the history
Addons: Fix Wordwrap wrong keybinding use
  • Loading branch information
eht16 authored Jan 1, 2023
2 parents 7467d4e + e736118 commit a8fd231
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
14 changes: 1 addition & 13 deletions addons/src/addons.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,6 @@ GeanyPlugin *geany_plugin = NULL;
GeanyData *geany_data = NULL;


/* Keybinding(s) */
enum
{
KB_FOCUS_BOOKMARK_LIST,
KB_FOCUS_TASKS,
KB_UPDATE_TASKS,
KB_XMLTAGGING,
KB_COPYFILEPATH,
KB_COUNT
};


typedef struct
{
/* general settings */
Expand Down Expand Up @@ -137,7 +125,7 @@ static gboolean ao_editor_notify_cb(GObject *object, GeanyEditor *editor,
SCNotification *nt, gpointer data)
{
ao_bookmark_list_update_marker(ao_info->bookmarklist, editor, nt);

ao_mark_editor_notify(ao_info->markword, editor, nt);

ao_color_tip_editor_notify(ao_info->colortip, editor, nt);
Expand Down
11 changes: 11 additions & 0 deletions addons/src/addons.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@
#ifndef ADDONS_H
#define ADDONS_H 1

/* Keybinding(s) */
enum
{
KB_FOCUS_BOOKMARK_LIST,
KB_FOCUS_TASKS,
KB_UPDATE_TASKS,
KB_XMLTAGGING,
KB_COPYFILEPATH,
KB_COUNT
};


extern GeanyPlugin *geany_plugin;
extern GeanyData *geany_data;
Expand Down
2 changes: 1 addition & 1 deletion addons/src/ao_wrapwords.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void enclose_text_action (guint key_id)
if (sci_get_selected_text_length (sci_obj) < 2)
return;

key_id -= 4;
key_id -= KB_COUNT;
selection_end = sci_get_selection_end (sci_obj);

sci_start_undo_action (sci_obj);
Expand Down

0 comments on commit a8fd231

Please sign in to comment.