diff -ru ../geany/geany.glade ./geany.glade
--- ../geany/geany.glade	2007-01-20 08:14:05.000000000 -0600
+++ ./geany.glade	2007-01-20 21:49:09.000000000 -0600
@@ -704,6 +704,24 @@
 		  </child>
 
 		  <child>
+		    <widget class="GtkMenuItem" id="find_nextsel1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Find _Selected</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_find_nextsel1_activate" last_modification_time="Sun, 21 Jan 2007 03:42:32 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="find_prevsel1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Find Pre_v Selected</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_find_prevsel_activate" last_modification_time="Sun, 21 Jan 2007 03:42:32 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
 		    <widget class="GtkMenuItem" id="find_in_files1">
 		      <property name="visible">True</property>
 		      <property name="label" translatable="yes">Find in F_iles</property>
diff -ru ../geany/src/callbacks.c ./src/callbacks.c
--- ../geany/src/callbacks.c	2007-01-20 08:14:05.000000000 -0600
+++ ./src/callbacks.c	2007-01-20 23:34:22.000000000 -0600
@@ -1327,6 +1327,22 @@
 
 
 void
+on_find_nextsel1_activate             (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	search_find_selection(document_get_cur_idx(), FALSE);
+}
+
+
+void
+on_find_prevsel1_activate             (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	search_find_selection(document_get_cur_idx(), TRUE);
+}
+
+
+void
 on_replace1_activate                   (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
diff -ru ../geany/src/callbacks.h ./src/callbacks.h
--- ../geany/src/callbacks.h	2007-01-16 00:32:05.000000000 -0600
+++ ./src/callbacks.h	2007-01-20 21:15:25.000000000 -0600
@@ -308,6 +308,12 @@
 void
 on_find_previous1_activate             (GtkMenuItem     *menuitem,
                                         gpointer         user_data);
+void
+on_find_nextsel1_activate             (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+void
+on_find_prevsel1_activate             (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
 
 void
 on_replace1_activate                   (GtkMenuItem     *menuitem,
diff -ru ../geany/src/interface.c ./src/interface.c
--- ../geany/src/interface.c	2007-01-20 08:14:05.000000000 -0600
+++ ./src/interface.c	2007-01-20 22:00:18.000000000 -0600
@@ -114,6 +114,8 @@
   GtkWidget *find1;
   GtkWidget *find_next1;
   GtkWidget *find_previous1;
+  GtkWidget *find_nextsel1;
+  GtkWidget *find_prevsel1;
   GtkWidget *find_in_files1;
   GtkWidget *replace1;
   GtkWidget *image1433;
@@ -598,6 +600,14 @@
   gtk_widget_show (find_previous1);
   gtk_container_add (GTK_CONTAINER (search1_menu), find_previous1);
 
+  find_nextsel1 = gtk_menu_item_new_with_mnemonic (_("Find _Selected"));
+  gtk_widget_show (find_nextsel1);
+  gtk_container_add (GTK_CONTAINER (search1_menu), find_nextsel1);
+
+  find_prevsel1 = gtk_menu_item_new_with_mnemonic (_("Find Pre_v Selected"));
+  gtk_widget_show (find_prevsel1);
+  gtk_container_add (GTK_CONTAINER (search1_menu), find_prevsel1);
+
   find_in_files1 = gtk_menu_item_new_with_mnemonic (_("Find in F_iles"));
   gtk_widget_show (find_in_files1);
   gtk_container_add (GTK_CONTAINER (search1_menu), find_in_files1);
@@ -1296,6 +1306,12 @@
   g_signal_connect ((gpointer) find_previous1, "activate",
                     G_CALLBACK (on_find_previous1_activate),
                     NULL);
+  g_signal_connect ((gpointer) find_nextsel1, "activate",
+                    G_CALLBACK (on_find_nextsel1_activate),
+                    NULL);
+  g_signal_connect ((gpointer) find_prevsel1, "activate",
+                    G_CALLBACK (on_find_prevsel1_activate),
+                    NULL);
   g_signal_connect ((gpointer) find_in_files1, "activate",
                     G_CALLBACK (on_find_in_files1_activate),
                     NULL);
@@ -1563,6 +1579,8 @@
   GLADE_HOOKUP_OBJECT (window1, find1, "find1");
   GLADE_HOOKUP_OBJECT (window1, find_next1, "find_next1");
   GLADE_HOOKUP_OBJECT (window1, find_previous1, "find_previous1");
+  GLADE_HOOKUP_OBJECT (window1, find_nextsel1, "find_nextsel1");
+  GLADE_HOOKUP_OBJECT (window1, find_prevsel1, "find_prevsel1");  
   GLADE_HOOKUP_OBJECT (window1, find_in_files1, "find_in_files1");
   GLADE_HOOKUP_OBJECT (window1, replace1, "replace1");
   GLADE_HOOKUP_OBJECT (window1, image1433, "image1433");
diff -ru ../geany/src/keybindings.c ./src/keybindings.c
--- ../geany/src/keybindings.c	2007-01-20 08:14:05.000000000 -0600
+++ ./src/keybindings.c	2007-01-20 22:03:49.000000000 -0600
@@ -65,6 +65,8 @@
 static void cb_func_menu_insert_date(guint key_id);
 static void cb_func_menu_findnext(guint key_id);
 static void cb_func_menu_findprevious(guint key_id);
+static void cb_func_menu_findnextsel(guint key_id);
+static void cb_func_menu_findprevsel(guint key_id);
 static void cb_func_menu_replace(guint key_id);
 static void cb_func_menu_findinfiles(guint key_id);
 static void cb_func_menu_nextmessage(guint key_id);
@@ -138,6 +140,10 @@
 		GDK_F3, 0, "menu_findnext", _("Find Next"));
 	keys[GEANY_KEYS_MENU_FINDPREVIOUS] = fill(cb_func_menu_findprevious,
 		GDK_F3, GDK_SHIFT_MASK, "menu_findprevious", _("Find Previous"));
+	keys[GEANY_KEYS_MENU_FINDNEXTSEL] = fill(cb_func_menu_findnextsel,
+		GDK_h, GDK_CONTROL_MASK, "menu_findnextsel", _("Find Next Selection"));
+	keys[GEANY_KEYS_MENU_FINDPREVSEL] = fill(cb_func_menu_findprevsel,
+		GDK_h, GDK_SHIFT_MASK | GDK_CONTROL_MASK, "menu_findprevsel", _("Find Previous Selection"));
 	keys[GEANY_KEYS_MENU_REPLACE] = fill(cb_func_menu_replace,
 		GDK_e, GDK_CONTROL_MASK, "menu_replace", _("Replace"));
 	keys[GEANY_KEYS_MENU_FINDINFILES] = fill(cb_func_menu_findinfiles, GDK_f,
@@ -294,6 +300,8 @@
 	GEANY_ADD_ACCEL(GEANY_KEYS_MENU_PREFERENCES, preferences1);
 	GEANY_ADD_ACCEL(GEANY_KEYS_MENU_FINDNEXT, find_next1);
 	GEANY_ADD_ACCEL(GEANY_KEYS_MENU_FINDPREVIOUS, find_previous1);
+	GEANY_ADD_ACCEL(GEANY_KEYS_MENU_FINDNEXTSEL, find_nextsel1);
+	GEANY_ADD_ACCEL(GEANY_KEYS_MENU_FINDPREVSEL, find_prevsel1);
 	GEANY_ADD_ACCEL(GEANY_KEYS_MENU_REPLACE, replace1);
 	GEANY_ADD_ACCEL(GEANY_KEYS_MENU_FINDINFILES, find_in_files1);
 	GEANY_ADD_ACCEL(GEANY_KEYS_MENU_NEXTMESSAGE, next_message1);
@@ -526,6 +534,17 @@
 	on_find_previous1_activate(NULL, NULL);
 }
 
+static void cb_func_menu_findprevsel(G_GNUC_UNUSED guint key_id)
+{
+	on_find_prevsel1_activate(NULL, NULL);
+}
+
+static void cb_func_menu_findnextsel(G_GNUC_UNUSED guint key_id)
+{
+	on_find_nextsel1_activate(NULL, NULL);
+}
+
+
 static void cb_func_menu_replace(G_GNUC_UNUSED guint key_id)
 {
 	on_replace1_activate(NULL, NULL);
diff -ru ../geany/src/keybindings.h ./src/keybindings.h
--- ../geany/src/keybindings.h	2007-01-15 00:46:33.000000000 -0600
+++ ./src/keybindings.h	2007-01-20 20:55:21.000000000 -0600
@@ -60,6 +60,8 @@
 	GEANY_KEYS_MENU_PREFERENCES,
 	GEANY_KEYS_MENU_FINDNEXT,
 	GEANY_KEYS_MENU_FINDPREVIOUS,
+	GEANY_KEYS_MENU_FINDNEXTSEL,
+	GEANY_KEYS_MENU_FINDPREVSEL,
 	GEANY_KEYS_MENU_REPLACE,
 	GEANY_KEYS_MENU_FINDINFILES,
 	GEANY_KEYS_MENU_NEXTMESSAGE,
diff -ru ../geany/src/search.c ./src/search.c
--- ../geany/src/search.c	2007-01-20 08:14:05.000000000 -0600
+++ ./src/search.c	2007-01-20 23:35:53.000000000 -0600
@@ -240,6 +240,39 @@
 }
 
 
+/* Search for next match of the current "selection"
+ * For X11 based systems, this will try to use the system-wide 
+ * x-selection first. If it doesn't find anything suitable in
+ * the x-selection (or if we are on Win32) it will try to use
+ * the scintilla selection or current token instead. 
+ * Search flags are always zero.
+ */
+void search_find_selection(gint idx, gboolean search_backwards)
+{
+	gchar *s = NULL;
+	if ( idx < 0 ) { return; }
+#ifdef G_OS_UNIX
+	GtkClipboard *clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY);
+	s=gtk_clipboard_wait_for_text(clipboard);
+	if (s)
+	{
+		if (strchr(s,'\n') || strchr(s, '\r'))
+		{
+			g_free(s);
+			s=NULL;
+		};
+	}
+#endif
+	if (!s)	{ s=get_default_text(idx); }
+	if (s)
+	{
+		document_find_text(idx, s, 0, search_backwards, TRUE);
+		g_free(s);
+
+	}
+}
+
+
 void search_show_find_dialog()
 {
 	gint idx = document_get_cur_idx();
diff -ru ../geany/src/search.h ./src/search.h
--- ../geany/src/search.h	2007-01-15 00:46:33.000000000 -0600
+++ ./src/search.h	2007-01-20 23:28:09.000000000 -0600
@@ -48,4 +48,6 @@
 
 void search_find_usage(const gchar *search_text, gint flags, gboolean in_session);
 
+void search_find_selection(gint idx, gboolean search_backwards);
+
 #endif
