5414: Fix test code lens r=jonas-schievink a=avrong

Closes #5217

The implementation is quite similar to #4821. Maybe we should somehow deal with duplicated code.

Also, both of these requests introduce some unclear behavior. I'm not sure how to process this, therefore asking for advice. Examples are below.
<img width="286" alt="image" src="https://user-images.githubusercontent.com/6342851/87713209-83595f80-c7b2-11ea-8c0f-a12e7571e7df.png">

Co-authored-by: Aleksei Trifonov <avrong@avrong.me>
This commit is contained in:
bors[bot] 2020-08-09 21:23:20 +00:00 committed by GitHub
commit 9995e79cce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -892,7 +892,7 @@ pub(crate) fn handle_code_lens(
}
let action = runnable.action();
let range = to_proto::range(&line_index, runnable.nav.focus_or_full_range());
let range = to_proto::range(&line_index, runnable.nav.full_range);
let r = to_proto::runnable(&snap, file_id, runnable)?;
if snap.config.lens.run {
let lens = CodeLens {