From dad08287b545cc0ac1dad630ea7fa259e9b1ee8b Mon Sep 17 00:00:00 2001 From: "pkasting@chromium.org" Date: Mon, 8 Jun 2009 20:33:29 +0000 Subject: Fix regression where hitting enter in the Omnibox would ignore recent editing. Sadly, the only way I could find to fix this was a latest_result() accessor, because when the user hits enter, we really do need to use the very latest results. This just highlights how more of this stuff should move to the AutocompleteController. BUG=13428 TEST=Type "food.c" and wait for the popup to stabilize. Then _very_ quickly type "om" and hit enter. You should navigate to food.com instead of searching for "food.c". Review URL: http://codereview.chromium.org/118398 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17891 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/autocomplete/autocomplete.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'chrome/browser/autocomplete/autocomplete.cc') diff --git a/chrome/browser/autocomplete/autocomplete.cc b/chrome/browser/autocomplete/autocomplete.cc index 3276b6e..4c94637 100644 --- a/chrome/browser/autocomplete/autocomplete.cc +++ b/chrome/browser/autocomplete/autocomplete.cc @@ -703,8 +703,7 @@ void AutocompleteController::Stop(bool clear_result) { update_pending_ = false; if (clear_result) result_.Reset(); - latest_result_.CopyFrom(result_); // Not strictly necessary, but keeps - // internal state consistent. + latest_result_.CopyFrom(result_); coalesce_timer_.Stop(); max_delay_timer_.Stop(); } -- cgit v1.1