|
|
@ -121,12 +121,13 @@ export class InputHint extends React.Component<InputHintProps, InputHitState>
|
|
|
|
let intelliSenseCmdList: string[] = [];
|
|
|
|
let intelliSenseCmdList: string[] = [];
|
|
|
|
for (let cmdName of this.props.cmdList)
|
|
|
|
for (let cmdName of this.props.cmdList)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (cmdName.indexOf(inputCmd) !== -1)
|
|
|
|
if (inputCmd.length === 1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (cmdName.indexOf(inputCmd) === 0)
|
|
|
|
intelliSenseCmdList.push(cmdName);
|
|
|
|
intelliSenseCmdList.push(cmdName);
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (searchReg.test(cmdName))
|
|
|
|
else if (cmdName.indexOf(inputCmd) !== -1
|
|
|
|
|
|
|
|
|| searchReg.test(cmdName))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
intelliSenseCmdList.push(cmdName);
|
|
|
|
intelliSenseCmdList.push(cmdName);
|
|
|
|
}
|
|
|
|
}
|
|
|
|