Opened on Mar 1, 2020 at 5:59:25 PM
Closed on Mar 6, 2020 at 8:54:33 AM
#3751 closed Bug (Fixed)
Abbreviation Manager with abbreviation [
| Reported by: | Nine | Owned by: | Melba23 |
|---|---|---|---|
| Milestone: | Component: | SciTE4AutoIt | |
| Version: | 3.3.14.5 | Severity: | None |
| Keywords: | Cc: |
Description
Creating an abbreviation with character [ generates all sort of problems. Unable to delete, to rename, to edit. Only way to get rid of it is to go directly into the au3UserAbbrev.properties file and delete the line.
Attachments (0)
Change History (7)
comment:1 by , on Mar 3, 2020 at 7:42:05 AM
| Component: | AutoIt → SciTE4AutoIt |
|---|---|
| Owner: | set to |
comment:2 by , on Mar 4, 2020 at 9:30:23 AM
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:4 by , on Mar 4, 2020 at 11:02:52 AM
The problem is in the RegEx used to match the abbreviation name to the list of existing abbreviations - it fails to match if there is a "[" character in the name. I imagine it is because the "[" character has a special meaning within a RegEx pattern.
I will see what I can do to get around this.
M23
comment:5 by , on Mar 4, 2020 at 11:20:21 AM
I have removed the offending RegEx and used a less elegant, but functioning(!) StringInStr in its place. Please try this version of the _SearchArray function - you will need to replace the existing function in "Your_Path\AutoIt3\SciTE\SciTEConfig\AbbrevMan.au3":
Func _SearchArray($aArray, $sAbbrev_Name) For $i = 1 To $aArray[0] Local $iIndex = StringInStr($aArray[$i], "=") If $iIndex <> 0 Then If StringLeft($aArray[$i], $iIndex - 1) = $sAbbrev_Name Then Return $i EndIf EndIf Next Return -1 EndFunc ;==>_SearchArray
If you are unsure of just what to do, please send me a PM and I will explain in more detail and/or send you a whole new AbbrevMan file.
M23
Edit: Sorry, just seen who raised the ticket - no intent to suggest you do not know what you are doing!
comment:7 by , on Mar 6, 2020 at 8:54:33 AM
| Resolution: | → Fixed |
|---|---|
| Status: | assigned → closed |

After some testing I take it you are referring to using the "[" character in the NAME of the abbreviation and not in the text to be inserted when the abbreviation is expanded. I will look into why this is the case.
M23