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

Unified Diff: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h

Issue 2395233005: [Mac] Preserve original selection when suggesting completions with diacritics (Closed)
Patch Set: s/ASSERT/EXPECT Created 4 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
Index: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h
index dc284b4e0df63aae835b2ebac101746a4902a322..134e5eeb853d14c52a629956b46a01b02ee4383e 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h
@@ -39,6 +39,14 @@ class AutocompleteTextFieldObserver;
// Indicates if the text has been changed by key events.
BOOL textChangedByKeyEvents_;
+
+ // Stores requested selection range, before it's adjusted to grapheme
+ // boundaries. This range is what text editing commands
+ // will operate on, vs. |visualSelectionRange_|, which reflects the
+ // range that looks highlighted. [self selectedRange] returns this.
+ NSRange actualSelectionRange_;
+ // The selected range as far as NSTextView is concerned.
+ NSRange visualSelectionRange_;
}
// The delegate is always an AutocompleteTextField*. Override the superclass

Powered by Google App Engine
This is Rietveld 408576698