Skip to content
This repository was archived by the owner on Mar 1, 2019. It is now read-only.

Support the use of a length field for Range #12

Merged
merged 2 commits into from
Apr 27, 2017
Merged

Support the use of a length field for Range #12

merged 2 commits into from
Apr 27, 2017

Conversation

skeleten
Copy link
Contributor

The textDocument/didChange has an optional rangeLength field. This
was not previously represented in the Range struct, but might be used
in rls_vfs to handle this event better in case the end field is
scrambled (looking at you, emacs)

related to: rust-lang/rls#281 and rust-dev-tools/rls-vfs#12

Copy link
Member

@nrc nrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of minor changes, but otherwise looks good.

src/lib.rs Outdated
@@ -31,7 +31,6 @@ pub mod compiler;

#[derive(Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct Column<I: Indexed>(pub u32, PhantomData<I>);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: please don't remove this blank line

src/lib.rs Outdated
}
}

pub fn new_with_len(row_start: Row<I>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should be consistent about naming - use either len or length for both the field and in the methods.

@sophiajt
Copy link

Thanks!

@sophiajt sophiajt merged commit bf51017 into rust-dev-tools:master Apr 27, 2017
skeleten added 2 commits April 28, 2017 00:23
The `textDocument/didChange` has an optional `rangeLength` field. This
was not previously represented in the `Range` struct, but might be used
in `rls_vfs` to handle this event better in case the `end` field is
scrambled (looking at you, emacs)
Mainly because I already opened up a PR on rust-lang-nursery/rls that
uses a `_len` method :P
albel727 added a commit to albel727/rls-span that referenced this pull request May 2, 2017
This reverts commit bf51017, reversing
changes made to 4b6e210.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants