diff --git a/src/callbacks.c b/src/callbacks.c
index 645c437..9f6f441 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -917,8 +917,8 @@ static void find_usage(gboolean in_session)
 	}
 	else
 	{
-		editor_find_current_word(doc->editor, -1,
-			editor_info.current_word, GEANY_MAX_WORD_LENGTH, NULL);
+		editor_find_current_word_sciwc(doc->editor, -1,
+			editor_info.current_word, GEANY_MAX_WORD_LENGTH);
 		search_text = g_strdup(editor_info.current_word);
 		flags = SCFIND_MATCHCASE | SCFIND_WHOLEWORD;
 	}
diff --git a/src/editor.c b/src/editor.c
index 207f29b..c4e60da 100644
--- a/src/editor.c
+++ b/src/editor.c
@@ -1664,6 +1664,32 @@ void editor_find_current_word(GeanyEditor *editor, gint pos, gchar *word, size_t
 }
 
 
+/* Same as editor_find_current_word() but uses editor's word boundaries to decide what the word
+ * is.  This should be used e.g. to get the word to search for */
+void editor_find_current_word_sciwc(GeanyEditor *editor, gint pos, gchar *word, gsize wordlen)
+{
+	guint start;
+	guint end;
+
+	g_return_if_fail(editor != NULL);
+
+	if (pos == -1)
+		pos = sci_get_current_position(editor->sci);
+
+	start = SSM(editor->sci, SCI_WORDSTARTPOSITION, pos, TRUE);
+	end = SSM(editor->sci, SCI_WORDENDPOSITION, pos, TRUE);
+
+	if (start == end) /* caret in whitespaces sequence */
+		*word = 0;
+	else
+	{
+		if ((end - start) >= wordlen)
+			end = start + (wordlen - 1);
+		sci_get_text_range(editor->sci, start, end, word);
+	}
+}
+
+
 /**
  *  Finds the word at the position specified by @a pos. If any word is found, it is returned.
  *  Otherwise NULL is returned.
@@ -3959,7 +3985,10 @@ void editor_finalize()
 
 
 /* wordchars: NULL or a string containing characters to match a word.
- * Returns: the current selection or the current word. */
+ * Returns: the current selection or the current word.
+ * 
+ * Passing NULL as wordchars is NOT the same as passing GEANY_WORDCHARS: NULL means
+ * using Scintillas's word boundaries. */
 gchar *editor_get_default_selection(GeanyEditor *editor, gboolean use_current_word,
 									const gchar *wordchars)
 {
@@ -3968,17 +3997,16 @@ gchar *editor_get_default_selection(GeanyEditor *editor, gboolean use_current_wo
 	g_return_val_if_fail(editor != NULL, NULL);
 
 	if (sci_get_lines_selected(editor->sci) == 1)
-	{
-		gint len = sci_get_selected_text_length(editor->sci);
-
-		s = g_malloc(len + 1);
-		sci_get_selected_text(editor->sci, s);
-	}
+		s = sci_get_selection_contents(editor->sci);
 	else if (sci_get_lines_selected(editor->sci) == 0 && use_current_word)
 	{	/* use the word at current cursor position */
 		gchar word[GEANY_MAX_WORD_LENGTH];
 
-		editor_find_current_word(editor, -1, word, sizeof(word), wordchars);
+		if (wordchars != NULL)
+			editor_find_current_word(editor, -1, word, sizeof(word), wordchars);
+		else
+			editor_find_current_word_sciwc(editor, -1, word, sizeof(word));
+
 		if (word[0] != '\0')
 			s = g_strdup(word);
 	}
diff --git a/src/editor.h b/src/editor.h
index 9ecbb05..997f4a8 100644
--- a/src/editor.h
+++ b/src/editor.h
@@ -240,6 +240,8 @@ const GeanyEditorPrefs *editor_get_prefs(GeanyEditor *editor);
 void editor_find_current_word(GeanyEditor *editor, gint pos, gchar *word, size_t wordlen,
 	const gchar *wc);
 
+void editor_find_current_word_sciwc(GeanyEditor *editor, gint pos, gchar *word, gsize wordlen);
+
 gchar *editor_get_word_at_pos(GeanyEditor *editor, gint pos, const gchar *wordchars);
 
 gchar *editor_get_default_selection(GeanyEditor *editor, gboolean use_current_word, const gchar *wordchars);
diff --git a/src/keybindings.c b/src/keybindings.c
index bbe97e2..6c8f1f8 100644
--- a/src/keybindings.c
+++ b/src/keybindings.c
@@ -86,9 +86,9 @@ static GtkWidget *switch_dialog_label = NULL;
 static gboolean on_key_press_event(GtkWidget *widget, GdkEventKey *event, gpointer user_data);
 static gboolean on_key_release_event(GtkWidget *widget, GdkEventKey *event, gpointer user_data);
 
-static gboolean check_current_word(GeanyDocument *doc);
-static gboolean read_current_word(GeanyDocument *doc);
-static gchar *get_current_word_or_sel(GeanyDocument *doc);
+static gboolean check_current_word(GeanyDocument *doc, gboolean sci_word);
+static gboolean read_current_word(GeanyDocument *doc, gboolean sci_word);
+static gchar *get_current_word_or_sel(GeanyDocument *doc, gboolean sci_word);
 
 static gboolean cb_func_file_action(guint key_id);
 static gboolean cb_func_project_action(guint key_id);
@@ -1415,16 +1415,12 @@ static gboolean cb_func_search_action(guint key_id)
 		case GEANY_KEYS_SEARCH_PREVIOUSMESSAGE:
 			on_previous_message1_activate(NULL, NULL); break;
 		case GEANY_KEYS_SEARCH_FINDUSAGE:
-			read_current_word(doc);
-			on_find_usage1_activate(NULL, NULL);
-			break;
+			on_find_usage1_activate(NULL, NULL); break;
 		case GEANY_KEYS_SEARCH_FINDDOCUMENTUSAGE:
-			read_current_word(doc);
-			on_find_document_usage1_activate(NULL, NULL);
-			break;
+			on_find_document_usage1_activate(NULL, NULL); break;
 		case GEANY_KEYS_SEARCH_MARKALL:
 		{
-			gchar *text = get_current_word_or_sel(doc);
+			gchar *text = get_current_word_or_sel(doc, TRUE);
 
 			if (sci_has_selection(sci))
 				search_mark_all(doc, text, SCFIND_MATCHCASE);
@@ -1546,25 +1542,29 @@ static gboolean cb_func_build_action(guint key_id)
 }
 
 
-static gboolean read_current_word(GeanyDocument *doc)
+static gboolean read_current_word(GeanyDocument *doc, gboolean sci_word)
 {
-	gint pos;
-
 	if (doc == NULL)
 		return FALSE;
 
-	pos = sci_get_current_position(doc->editor->sci);
-
-	editor_find_current_word(doc->editor, pos,
-		editor_info.current_word, GEANY_MAX_WORD_LENGTH, NULL);
+	if (sci_word)
+	{
+		editor_find_current_word_sciwc(doc->editor, -1,
+			editor_info.current_word, GEANY_MAX_WORD_LENGTH);
+	}
+	else
+	{
+		editor_find_current_word(doc->editor, -1,
+			editor_info.current_word, GEANY_MAX_WORD_LENGTH, NULL);
+	}
 
 	return (*editor_info.current_word != 0);
 }
 
 
-static gboolean check_current_word(GeanyDocument *doc)
+static gboolean check_current_word(GeanyDocument *doc, gboolean sci_word)
 {
-	if (!read_current_word(doc))
+	if (! read_current_word(doc, sci_word))
 	{
 		utils_beep();
 		return FALSE;
@@ -1573,14 +1573,14 @@ static gboolean check_current_word(GeanyDocument *doc)
 }
 
 
-static gchar *get_current_word_or_sel(GeanyDocument *doc)
+static gchar *get_current_word_or_sel(GeanyDocument *doc, gboolean sci_word)
 {
 	ScintillaObject *sci = doc->editor->sci;
 
 	if (sci_has_selection(sci))
 		return sci_get_selection_contents(sci);
 
-	return read_current_word(doc) ? g_strdup(editor_info.current_word) : NULL;
+	return read_current_word(doc, sci_word) ? g_strdup(editor_info.current_word) : NULL;
 }
 
 
@@ -1934,7 +1934,7 @@ static gboolean cb_func_clipboard_action(guint key_id)
 
 static void goto_tag(GeanyDocument *doc, gboolean definition)
 {
-	gchar *text = get_current_word_or_sel(doc);
+	gchar *text = get_current_word_or_sel(doc, FALSE);
 
 	if (text)
 		symbols_goto_tag(text, definition);
@@ -2148,7 +2148,7 @@ static gboolean cb_func_editor_action(guint key_id)
 			editor_show_macro_list(doc->editor);
 			break;
 		case GEANY_KEYS_EDITOR_CONTEXTACTION:
-			if (check_current_word(doc))
+			if (check_current_word(doc, FALSE))
 				on_context_action1_activate(GTK_MENU_ITEM(ui_lookup_widget(main_widgets.editor_menu,
 					"context_action1")), NULL);
 			break;
