Compare commits

...

1 Commits

Author SHA1 Message Date
Smit Barmase
d297aa69a9 take 2 on scroll perf for macos 26 2025-09-11 07:15:05 +05:30
2 changed files with 16 additions and 0 deletions

View File

@@ -957,6 +957,9 @@ impl PlatformInputHandler {
}
pub fn selected_bounds(&mut self, window: &mut Window, cx: &mut App) -> Option<Bounds<Pixels>> {
if self.handler.marked_text_range(window, cx).is_none() {
return None;
}
let selection = self.handler.selected_text_range(true, window, cx)?;
self.handler.bounds_for_range(
if selection.reversed {

View File

@@ -1370,6 +1370,19 @@ extern "C" fn did_finish_launching(this: &mut Object, _: Sel, _: id) {
object: nil
];
let defaults: id = msg_send![class!(NSUserDefaults), standardUserDefaults];
let keys: [id; 6] = [
ns_string("NSAutomaticTextCompletionEnabled"),
ns_string("NSAutomaticSpellingCorrectionEnabled"),
ns_string("NSAutomaticQuoteSubstitutionEnabled"),
ns_string("NSAutomaticDashSubstitutionEnabled"),
ns_string("NSAutomaticPeriodSubstitutionEnabled"),
ns_string("NSAutomaticCapitalizationEnabled"),
];
for key in keys {
let _: () = msg_send![defaults, setBool: NO forKey: key];
}
let platform = get_mac_platform(this);
let callback = platform.0.lock().finish_launching.take();
if let Some(callback) = callback {