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

Unified Diff: chrome/views/controls/text_field.cc

Issue 62067: Commits bug issuereview 62043 (http://codereview.chromium.org/62043)... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 8 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/views/controls/text_field.cc
===================================================================
--- chrome/views/controls/text_field.cc (revision 13163)
+++ chrome/views/controls/text_field.cc (working copy)
@@ -343,9 +343,9 @@
}
void TextField::Edit::SelectAll() {
- // Using (0, -1) here is equivalent to calling SetSelAll(); both will select
- // the "phantom newline" that we're trying to avoid.
- SetSel(0, GetTextLength());
+ // Select from the end to the front so that the first part of the text is
+ // always visible.
+ SetSel(GetTextLength(), 0);
}
void TextField::Edit::ClearSelection() {
« 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