Start work on interpreting 'label/insertText' completions
These completions don't supply a range that should be overwritten, so the client needs to infer it via substring matching. Co-authored-by: Keith Simmons <keith@zed.dev>
This commit is contained in:
parent
c280c85ce7
commit
263e3d8176
3 changed files with 20 additions and 1 deletions
|
@ -164,6 +164,15 @@ fn test_line_len() {
|
|||
assert_eq!(buffer.line_len(5), 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_common_prefix_at_positionn() {
|
||||
let buffer = Buffer::new(0, 0, History::new("a = (bcd)".into()));
|
||||
assert_eq!(
|
||||
buffer.common_prefix_at_position(Point::new(0, 8), "bcdef"),
|
||||
Point::new(0, 5)..Point::new(0, 8)
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_text_summary_for_range() {
|
||||
let buffer = Buffer::new(0, 0, History::new("ab\nefg\nhklm\nnopqrs\ntuvwxyz".into()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue