325: implement translate_offset_with_edit r=matklad a=vemoo

- Implement `translate_offset_with_edit` to resolve #105 
- Add proptest impls for text, offsets and edits and use them in tests for `translate_offset_with_edit` and `LineIndex`
- Added benchmark for `translate_offset_with_edit`

Co-authored-by: Bernardo <berublan@gmail.com>
This commit is contained in:
bors[bot] 2018-12-27 12:19:19 +00:00
commit e422c2e2f4
10 changed files with 718 additions and 150 deletions

View file

@ -2,6 +2,7 @@ mod code_actions;
mod extend_selection;
mod folding_ranges;
mod line_index;
mod line_index_utils;
mod symbols;
#[cfg(test)]
mod test_utils;
@ -12,6 +13,7 @@ pub use self::{
extend_selection::extend_selection,
folding_ranges::{folding_ranges, Fold, FoldKind},
line_index::{LineCol, LineIndex},
line_index_utils::translate_offset_with_edit,
symbols::{file_structure, file_symbols, FileSymbol, StructureNode},
typing::{join_lines, on_enter, on_eq_typed},
};