search phrase gets nice selected :)

This commit is contained in:
mishoo 2001-07-17 16:23:33 +00:00
parent d98609541c
commit a138641c73
2 changed files with 6 additions and 2 deletions

2
configure vendored
View File

@ -699,7 +699,7 @@ fi
PACKAGE=gmrun
VERSION=0.5.3
VERSION=0.5.4
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
{ echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }

View File

@ -1,5 +1,5 @@
/*****************************************************************************
* $Id: gtkcompletionline.cc,v 1.14 2001/07/17 16:09:00 mishoo Exp $
* $Id: gtkcompletionline.cc,v 1.15 2001/07/17 16:23:33 mishoo Exp $
* Copyright (C) 2000, Mishoo
* Author: Mihai Bazon Email: mishoo@fenrir.infoiasi.ro
*
@ -743,6 +743,8 @@ search_back_history(GtkCompletionLine* cl)
i = s.find(*cl->hist_word);
if (i != string::npos) {
gtk_entry_set_text(GTK_ENTRY(cl), histext);
gtk_entry_select_region(GTK_ENTRY(cl),
i, i + cl->hist_word->length());
gtk_signal_emit_by_name(GTK_OBJECT(cl), "search_letter");
return 1;
}
@ -768,6 +770,8 @@ search_forward_history(GtkCompletionLine* cl)
i = s.find(*cl->hist_word);
if (i != string::npos) {
gtk_entry_set_text(GTK_ENTRY(cl), histext);
gtk_entry_select_region(GTK_ENTRY(cl),
i, i + cl->hist_word->length());
gtk_signal_emit_by_name(GTK_OBJECT(cl), "search_letter");
return 1;
}