Jason Lee 2025-05-26 22:46:26 +08:00 committed by GitHub
parent 5419600fcd
commit 9073818d4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1304,10 +1304,12 @@ impl InputState {
cx,
);
removed_len += tab_indent.len();
}
// +1 for "\n"
offset += line.len().saturating_sub(tab_indent.len()) + 1;
// +1 for "\n"
offset += line.len().saturating_sub(tab_indent.len()) + 1;
} else {
offset += line.len() + 1;
}
}
self.selected_range = start_offset..selected_range.end.saturating_sub(removed_len);