fix: code cleanup, fix getCurrentCommand
This commit is contained in:
parent
cccc58b47f
commit
30b7efd585
5 changed files with 16 additions and 15 deletions
|
@ -18,6 +18,8 @@ export default class AutocompleteProvider {
|
|||
return null;
|
||||
}
|
||||
|
||||
this.commandRegex.lastIndex = 0;
|
||||
|
||||
let match;
|
||||
while ((match = this.commandRegex.exec(query)) != null) {
|
||||
let matchStart = match.index,
|
||||
|
@ -33,7 +35,6 @@ export default class AutocompleteProvider {
|
|||
};
|
||||
}
|
||||
}
|
||||
this.commandRegex.lastIndex = 0;
|
||||
return {
|
||||
command: null,
|
||||
range: {
|
||||
|
|
|
@ -10,10 +10,10 @@ export function TextualCompletion({
|
|||
description: ?string
|
||||
}) {
|
||||
return (
|
||||
<div className="mx_Autocomplete_Completion">
|
||||
<div style={{width: '100%'}}>
|
||||
<span>{title}</span>
|
||||
<em>{subtitle}</em>
|
||||
<span style={{color: 'gray', float: 'right'}}>{description}</span>
|
||||
<span style={{color: 'gray'}}>{description}</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue