提交 094d4c0b 编写于 作者: I isidor

repl: set the filterText correctly when computing suggestions in repl

上级 7293d498
......@@ -624,12 +624,11 @@ export class Process implements IProcess {
column: position.column,
line: position.lineNumber
}).then(response => {
console.log(response.body.targets);
return response && response.body && response.body.targets ? response.body.targets.map(item => (<ISuggestion>{
label: item.label,
insertText: item.text || item.label,
type: item.type,
filterText: item.start && item.length && text.substr(item.start, item.length),
filterText: item.start && item.length && text.substr(item.start, item.length).concat(item.label),
overwriteBefore: item.length || overwriteBefore
})) : [];
}, err => []);
......
......@@ -187,8 +187,7 @@ export class Repl extends Panel implements IPrivateReplService {
const focusedProcess = this.debugService.getViewModel().focusedProcess;
const completions = focusedProcess ? focusedProcess.completions(frameId, text, position, overwriteBefore) : TPromise.as([]);
return wireCancellationToken(token, completions.then(suggestions => ({
suggestions,
incomplete: true
suggestions
})));
}
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册