diff options
author | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-12 15:51:34 +0000 |
---|---|---|
committer | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-12 15:51:34 +0000 |
commit | 1af51337cab0b011f8fe9ecdf5a99b3e0c2bca7d (patch) | |
tree | df824f396215b06beaf406c3184ee8f94f130b77 /chrome/browser/autocomplete | |
parent | 34740a9613c84c572da3a01f3b5637734dac671e (diff) | |
download | chromium_src-1af51337cab0b011f8fe9ecdf5a99b3e0c2bca7d.zip chromium_src-1af51337cab0b011f8fe9ecdf5a99b3e0c2bca7d.tar.gz chromium_src-1af51337cab0b011f8fe9ecdf5a99b3e0c2bca7d.tar.bz2 |
[Mac] Support undo in the omnibox.
BUG=http://crbug.com/18084
TEST=You should be able to undo and redo typing and pasting in the omnibox, unless autocomplete has kicked in or you selected/highlighted an entry in the popup.
Review URL: http://codereview.chromium.org/246009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31785 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_mac.mm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm index bfe94e08..798a534 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm +++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm @@ -357,6 +357,7 @@ void AutocompleteEditViewMac::RevertAll() { // can be removed. EmphasizeURLComponents(); controller_->OnChanged(); + [field_ clearUndoChain]; } void AutocompleteEditViewMac::UpdatePopup() { @@ -478,6 +479,7 @@ void AutocompleteEditViewMac::OnTemporaryTextMaybeChanged( SetWindowTextAndCaretPos(display_text, display_text.size()); controller_->OnChanged(); + [field_ clearUndoChain]; } bool AutocompleteEditViewMac::OnInlineAutocompleteTextMaybeChanged( @@ -493,6 +495,7 @@ bool AutocompleteEditViewMac::OnInlineAutocompleteTextMaybeChanged( const NSRange range = NSMakeRange(user_text_length, display_text.size()); SetTextAndSelectedRange(display_text, range); controller_->OnChanged(); + [field_ clearUndoChain]; return true; } |