From 04138ddd6319947f798655a40cb436e888da2b0e Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Mon, 6 Jun 2022 20:44:51 +0200 Subject: [PATCH] completion improvments, - "." does not validate anymore but close leaving current text as-is - tm, BACKSPACE workaround, seemsuseless nowadays --- CHANGELOG.md | 9 +++++++++ src/u_editoroptions.pas | 4 ++-- src/u_synmemo.pas | 8 -------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ccc7793..dfcbbf43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# v3.9.19 + +## Enhancements + +- Completion, changed defaults so that `.` does not validate but instead close, leaving typed text as-is. + To apply changes, set editopr option `closeCompletionCharsWithSpace` to `*+-/^=~><%.` and `closeCompletionChars` to `,;)}]!`. +- Completion, while menu opened, Backspace had for effect to also delete next char. + This was an old workaround that has no reason to be maintained anymore. + # v3.9.18 ## Enhancements diff --git a/src/u_editoroptions.pas b/src/u_editoroptions.pas index 96693465..753ab5a9 100644 --- a/src/u_editoroptions.pas +++ b/src/u_editoroptions.pas @@ -264,8 +264,8 @@ begin fCurrLineAttribs.Background := 15789545; fCurrLineAttribs.Foreground := clNone; // - fCloseCompletionCharsWithSpace := '*+-/^=~><%'; - fCloseCompletionChars:= '.,;)}]!'; + fCloseCompletionCharsWithSpace := '*+-/^=~><%.'; + fCloseCompletionChars:= ',;)}]!'; // options1 := [eoAutoIndent, eoBracketHighlight, eoGroupUndo, eoTabsToSpaces, eoTrimTrailingSpaces, diff --git a/src/u_synmemo.pas b/src/u_synmemo.pas index eff492d0..01c03516 100644 --- a/src/u_synmemo.pas +++ b/src/u_synmemo.pas @@ -2868,14 +2868,6 @@ procedure TDexedMemo.completionDeleteKey(sender: TObject); begin if CaretX > 0 then begin - - // these "stinky" lines are necessary because - // the proc is called before deletion is effective - // i.e the deleted char is still there... - caretX := caretX - 1; - ExecuteCommand(ecDeleteChar, #0, nil); - caretX := caretX + 1; - getCompletionList(); if fCompletion.TheForm.ItemList.Count.equals(0) then begin