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

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: Wrap retained object in scoped_nsobject 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0b90b85a6acbce5d876c808b4be05039e27e1bfe 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,10 @@ class AutocompleteTextFieldObserver;
// Indicates if the text has been changed by key events.
BOOL textChangedByKeyEvents_;
+
+ // The selected range as far as NSTextView is concerned.
+ // See |actualSelectedRange|.
+ NSRange visualSelectedRange_;
}
// The delegate is always an AutocompleteTextField*. Override the superclass
@@ -50,6 +54,12 @@ class AutocompleteTextFieldObserver;
// storage object.
- (void)setAttributedString:(NSAttributedString*)aString;
+// 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.
+@property(nonatomic, readonly) NSRange actualSelectedRange;
+
@end
@interface AutocompleteTextFieldEditor(PrivateTestMethods)
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698