Opened 5 years ago
Closed 5 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 Changed 5 years ago by mLipok
- Component changed from AutoIt to SciTE4AutoIt
- Owner set to Jos
comment:2 Changed 5 years ago by Melba23
- Owner changed from Jos to Melba23
- Status changed from new to assigned
comment:3 Changed 5 years ago by Melba23
comment:4 Changed 5 years ago by Melba23
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 Changed 5 years ago by Melba23
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:6 Changed 5 years ago by anonymous
No offense M23. It works perfect, thank you very much.
comment:7 Changed 5 years ago by Melba23
- Resolution set to Fixed
- Status changed from assigned to closed
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
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