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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_win.cc

Issue 11093044: Fix omnibox suggestion: restore selection on WM_IME_ENDCOMPOSITION (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Restore selection Created 8 years, 2 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/ui/views/omnibox/omnibox_view_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/omnibox/omnibox_view_win.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_win.cc b/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
index ca7e4c575737eca669711b7c6a025afbb7c9694d..06ffc9528e79fb02bed36c43582a102611f57a57 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
@@ -1418,6 +1418,18 @@ LRESULT OmniboxViewWin::OnImeComposition(UINT message,
return result;
}
+
+LRESULT OmniboxViewWin::OnImeEndComposition(UINT message, WPARAM wparam,
+ LPARAM lparam) {
+ // Unlike RichEdit 2.0, RichEdit 4.1 clears the selection when it receives
Peter Kasting 2012/10/12 03:29:46 Nit: Slightly better: // The edit control auto-
Seigo Nonaka 2012/10/12 03:58:07 Updated, thanks. On 2012/10/12 03:29:46, Peter Kas
+ // WM_IME_ENDCOMPOSITION. Here we need to restore the selection manually.
+ CHARRANGE range;
+ GetSel(range);
+ LRESULT result = DefWindowProc(message, wparam, lparam);
+ SetSel(range);
+ return result;
+}
+
LRESULT OmniboxViewWin::OnImeNotify(UINT message,
WPARAM wparam,
LPARAM lparam) {
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698