Skip to main content

accept

Function accept 

Source
pub fn accept(text: &str, caret: usize, cand: &Candidate) -> (String, usize)
Expand description

Replace the word at caret (through the end of the identifier the caret is in) with cand: the new text and the caret after it. A function lands as NAME( with the caret after the (, reusing a ( that already follows.