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

Unified Diff: chrome/browser/autocomplete/autocomplete_edit_view_win.cc

Issue 172029: Ctrl+Backspace should clear inline suggested autocomplete text after caret al... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
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 | « chrome/browser/autocomplete/autocomplete_edit.h ('k') | 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_win.cc
===================================================================
--- chrome/browser/autocomplete/autocomplete_edit_view_win.cc (revision 23046)
+++ chrome/browser/autocomplete/autocomplete_edit_view_win.cc (working copy)
@@ -1817,6 +1817,13 @@
return true;
case VK_BACK: {
+ // On Ctrl+Backspace, the default Windows behavior is to delete the
+ // previous word, however this leaves behind the inline autocomplete
+ // suggestion text. Here we clear the suggestion text and place the caret
+ // at the end of the user typed text.
+ if (GetKeyState(VK_CONTROL) < 0)
Peter Kasting 2009/08/16 21:59:04 This approach isn't right. First, you need to hav
+ SetWindowTextAndCaretPos(model_->user_text(),
+ model_->user_text().length());
if ((flags & KF_ALTDOWN) || model_->is_keyword_hint() ||
model_->keyword().empty())
return false;
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698