private void OnTextBufferChanged(object sender, TextContentChangedEventArgs e) {
if (e.Changes.Count > 0) {
// In case of tabbing multiple lines update comes as multiple changes
// each is an insertion of whitespace in the beginning of the line.
// We don't want to combine them since then change will technically
// damage existing elements while actually it is just a whitespace change.
// All changes are relative to the current snapshot hence we have to transform
// them first and make them relative to each other so we can apply changes
// sequentially as after every change element positions will shift and hence
// next change must be relative to the new position and not to the current
// text buffer snapshot. Changes are sorted by position.
TreeUpdateTask.OnTextChanges(e.ConvertToRelative());
}
}