Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3410)

Unified Diff: chrome/browser/autocomplete/autocomplete_edit_view_mac.mm

Issue 181024: [Mac] Fix Option-return in Omnibox. (Closed)
Patch Set: Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
index f49963a13ffcd07ff2b36966419f9139bfc66114..4ca90dfe57c12fdb16f5230711095aa24eb4febb 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
@@ -757,6 +757,12 @@ std::wstring AutocompleteEditViewMac::GetClipboardText(Clipboard* clipboard) {
}
}
+ // TODO(shess): Option-tab, would normally insert a literal tab
+ // character. Consider combining with -insertTab:
+ if (cmd == @selector(insertTabIgnoringFieldEditor:)) {
+ return YES;
+ }
+
// |-noop:| is sent when the user presses Cmd+Return. Override the no-op
// behavior with the proper WindowOpenDisposition.
NSEvent* event = [NSApp currentEvent];
@@ -768,6 +774,12 @@ std::wstring AutocompleteEditViewMac::GetClipboardText(Clipboard* clipboard) {
return YES;
}
+ // TODO(shess): Option-return, would normally insert a literal
+ // newline. Consider combining with -insertNewline:.
+ if (cmd == @selector(insertNewlineIgnoringFieldEditor:)) {
+ return YES;
+ }
+
// When the user does Control-Enter, the existing content has "www."
// prepended and ".com" appended. |model_| should already have
// received notification when the Control key was depressed, but it
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698