Modify

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 mLipok, 6 years ago

Component: AutoItSciTE4AutoIt
Owner: set to Jos

comment:2 by Melba23, 6 years ago

Owner: changed from Jos to Melba23
Status: newassigned

comment:3 by Melba23, 6 years ago

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

comment:4 by Melba23, 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 Melba23, 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

Version 0, edited 6 years ago by Melba23 (next)

comment:6 by anonymous, 6 years ago

No offense M23. It works perfect, thank you very much.

comment:7 by Melba23, 6 years ago

Resolution: Fixed
Status: assignedclosed

Modify Ticket

Action
as closed The owner will remain Melba23.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.