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

Unified Diff: ui/views/controls/textfield/native_textfield_views.cc

Issue 12238002: Views Textfield: Copy on Ctrl+Insert, fix and disable overtype. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Expand unit tests. Created 7 years, 10 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 | « ui/gfx/render_text.cc ('k') | ui/views/controls/textfield/native_textfield_views_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/native_textfield_views.cc
diff --git a/ui/views/controls/textfield/native_textfield_views.cc b/ui/views/controls/textfield/native_textfield_views.cc
index c8cfb993c18da65c38b5abf7e4f36e4c23cd200c..8318671d454fd77df1aa233e7526a81877753472 100644
--- a/ui/views/controls/textfield/native_textfield_views.cc
+++ b/ui/views/controls/textfield/native_textfield_views.cc
@@ -1085,8 +1085,10 @@ bool NativeTextfieldViews::HandleKeyEvent(const ui::KeyEvent& key_event) {
text_changed = true;
break;
case ui::VKEY_INSERT:
- GetRenderText()->ToggleInsertMode();
- cursor_changed = true;
+ if (control && !shift)
+ Copy();
+ else if (shift && !control)
+ cursor_changed = text_changed = Paste();
break;
default:
break;
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/views/controls/textfield/native_textfield_views_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698