diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-29 20:47:25 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-29 20:47:25 +0000 |
commit | 3d25e9f94dcf5d731241877646a98fea228abe71 (patch) | |
tree | 384afd16a95301d700fd4f277f54b1bca1836237 /chrome/browser/autocomplete | |
parent | 858a79c8d042ea5a3101ba37f496f6da8ec2185f (diff) | |
download | chromium_src-3d25e9f94dcf5d731241877646a98fea228abe71.zip chromium_src-3d25e9f94dcf5d731241877646a98fea228abe71.tar.gz chromium_src-3d25e9f94dcf5d731241877646a98fea228abe71.tar.bz2 |
Ignore the insert key so we don't switch into overtype mode (which surprises users since there's no indicator of it).
BUG=6856
TEST=In Omnibox or in a native textfield (e.g. the "Add a site" URL field for the Options dialog's "Open these sites at startup" pref), type text, set cursor at beginning, hit insert, and type. Your text should prepend to the existing text instead of replacing it.
Review URL: http://codereview.chromium.org/115934
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17231 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_win.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc index 25fcbf2..3b5a61c 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc +++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc @@ -1729,6 +1729,11 @@ bool AutocompleteEditViewWin::OnKeyDownOnlyWritable(TCHAR key, return true; case VK_INSERT: + // Ignore insert by itself, so we don't turn overtype mode on/off. + if (!(flags & KF_ALTDOWN) && (GetKeyState(VK_SHIFT) >= 0) && + (GetKeyState(VK_CONTROL) >= 0)) + return true; + // FALL THROUGH case 'V': if ((flags & KF_ALTDOWN) || (GetKeyState((key == 'V') ? VK_CONTROL : VK_SHIFT) >= 0)) |