IDE: word completion: when option IdentComplReplaceIdentifier is off behave the same as identifier completion: replace only left side, issue #30510

git-svn-id: trunk@52867 -
This commit is contained in:
mattias 2016-08-24 09:58:35 +00:00
parent ba346b2fc9
commit 2be768995c
3 changed files with 7 additions and 0 deletions

View File

@ -74,6 +74,8 @@ begin
ICOpenDividerBevel.Caption:=lisIdCOpening;
ICAutoStartAfterPointCheckBox.Caption:=lisAutomaticallyInvokeAfterPoint;
ICAutoUseSingleIdent.Caption:=lisAutomaticallyUseSinglePossibleIdent;
ICAutoUseSingleIdent.Hint:=
lisWhenThereIsOnlyOnePossibleCompletionItemUseItImmed;
ICShowHelpCheckBox.Caption:=lisShowHelp;
ICShowHelpCheckBox.Hint:=lisBestViewedByInstallingAHTMLControlLikeTurbopowerip;

View File

@ -5647,6 +5647,9 @@ resourcestring
lisIdCOpening = 'Opening';
lisAutomaticallyInvokeAfterPoint = 'Automatically invoke after point';
lisAutomaticallyUseSinglePossibleIdent = 'Automatically use single possible identifier';
lisWhenThereIsOnlyOnePossibleCompletionItemUseItImmed = 'When there is only '
+'one possible completion item use it immediately, without showing the '
+'completion box';
lisAddParameterBrackets = 'Add parameter brackets';
lisReplaceWholeIdentifier = 'Replace whole identifier';
lisEnableReplaceWholeIdentifierDisableReplacePrefix = 'Enable = replace '

View File

@ -2296,6 +2296,8 @@ Begin
// the completion is already in Value
begin
ccSelection := '';
if not CodeToolsOpts.IdentComplReplaceIdentifier then
SourceEnd:=Editor.LogicalCaretXY;
if Value<>'' then AWordCompletion.AddWord(Value);
end;