diff --git a/src/UI/Components/commandLineInput/InputHint.tsx b/src/UI/Components/commandLineInput/InputHint.tsx index ff60ca72c..77f5db494 100644 --- a/src/UI/Components/commandLineInput/InputHint.tsx +++ b/src/UI/Components/commandLineInput/InputHint.tsx @@ -121,12 +121,13 @@ export class InputHint extends React.Component let intelliSenseCmdList: string[] = []; for (let cmdName of this.props.cmdList) { - if (cmdName.indexOf(inputCmd) !== -1) + if (inputCmd.length === 1) { - intelliSenseCmdList.push(cmdName); - continue; + if (cmdName.indexOf(inputCmd) === 0) + intelliSenseCmdList.push(cmdName); } - if (searchReg.test(cmdName)) + else if (cmdName.indexOf(inputCmd) !== -1 + || searchReg.test(cmdName)) { intelliSenseCmdList.push(cmdName); }