Square brackets in Completion List

SyntaxEditor for WPF Forum

Posted 12 years ago by Robert Croshere
Version: 11.2.0551
Avatar
Hi,

I want to have a number of items in a completion list that begin with a square bracket "[". If the CompletionItem text start with a "[", the items will not show up in the list. If I remove the bracket in the text, but keep the bracket in the AutoCompletePreText, the items will not show up either. If I remove the bracket, they show up again. Is this a bug or something I can work around?

Regards,
Robert

Comments (3)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Robert,

I tested adding an item that started with a "[" and it worked fine. There shouldn't be anything on our end that would affect that. If you think it is a bug of ours, please make a new simple sample project that shows the issue and email that over to our support address. Make sure to rename the .zip file extension so it doesn't get spam blocked.


Actipro Software Support

Posted 12 years ago by Robert Croshere
Avatar
Well, I have it now working partially. After adding "[" to the allowed characters, it showed up, however, at first it threw me off that the items are apparently sorted on the AutoCompletePreText and not on the caption, which were both different in my case. I have now run into another problem: if I select the item in the completion list it enters and patch of whitespace into the editor. If I try to delete that, the following exception is thrown:

>>
System.ArgumentOutOfRangeException was unhandled
Message=Index and length must refer to a location within the string.
Parameter name: length
Source=mscorlib
ParamName=length
StackTrace:
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at #PZc.#VZc.ToString(Int32 startOffset, Int32 endOffset)
at ActiproSoftware.Text.Implementation.TextDocumentBase.#O7c(#g7b textChange)
at #Q2b.#g7b.Apply()
at ActiproSoftware.Text.Implementation.TextDocumentBase.ReplaceText(ITextChangeType type, Int32 offset, Int32 length, String text, ITextChangeOptions options)
at ActiproSoftware.Text.Implementation.TextDocumentBase.DeleteText(ITextChangeType type, Int32 offset, Int32 length, ITextChangeOptions options)
at ActiproSoftware.Windows.Controls.SyntaxEditor.EditActions.BackspaceAction.Execute(IEditorView view)
at ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.EditorView.ExecuteEditAction(IEditAction action)
at ActiproSoftware.Windows.Controls.SyntaxEditor.Implementation.EditActionBase.#Bfc(Object sender, ExecutedRoutedEventArgs e)
at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
<<

I cut off the last part of the stacktract as it was quite long. It will try and create a repro for this.

Regards,
Robert
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Robert,

We'd probably need to have a simple sample project to debug that shows this. Can you put one together that repros it and email it to our support address? Include repro instructions in the email. Also, please rename the .zip file extension so it doesn't get spam blocked.


Actipro Software Support

The latest build of this product (v24.1.2) was released 0 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.