diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-28 20:04:07 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-28 20:04:07 +0000 |
commit | 8768b4555d2ce58da02a5a51894f455cc2dfb158 (patch) | |
tree | d966e1281feb75b88391945e200ec6851b144017 /chrome/browser/ui/cocoa | |
parent | 8c23a87bd4f1c7aa5b7426bc6e0ab4f959669cbf (diff) | |
download | chromium_src-8768b4555d2ce58da02a5a51894f455cc2dfb158.zip chromium_src-8768b4555d2ce58da02a5a51894f455cc2dfb158.tar.gz chromium_src-8768b4555d2ce58da02a5a51894f455cc2dfb158.tar.bz2 |
Makes instant suggest commit immediately. If folks like this, I can
rip out some more code.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6360022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73006 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/cocoa')
-rw-r--r-- | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm index ba43a7c..3a1746b 100644 --- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm +++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm @@ -139,8 +139,14 @@ std::wstring LocationBarViewMac::GetInputString() const { } void LocationBarViewMac::SetSuggestedText(const string16& text) { - edit_view_->SetInstantSuggestion( - edit_view_->model()->UseVerbatimInstant() ? string16() : text); + // This method is internally invoked to reset suggest text, so we only do + // anything if the text isn't empty. + // TODO: if we keep autocomplete, make it so this isn't invoked with empty + // text. + if (!text.empty()) { + edit_view_->model()->FinalizeInstantQuery(edit_view_->GetText(), text, + false); + } } WindowOpenDisposition LocationBarViewMac::GetWindowOpenDisposition() const { |