Opened 6 years ago
Closed 6 years ago
#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 , 6 years ago
| Component: | AutoIt → SciTE4AutoIt |
|---|---|
| Owner: | set to |
comment:2 by , 6 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:3 by , 6 years ago
comment:4 by , 6 years ago
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 , 6 years ago
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
comment:7 by , 6 years ago
| 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