Hello,
We have discovered a bug that is critical to our environment.
In our app we need to set syntaxEditor.Document.HeaderText and syntaxEditor.Document.FooterText along with syntaxEditor.Document.Text.
HeaderText usually ends with xml comment like this:On the next line we have the text that is displayed in syntaxEditor.Document.Text and is shown to user. Line in HeaderText while debugging shows that it ends with \n\r.
It appears that when setting HeaderText it gets trimmed so that document.Text is under comment line (//). Under these circumstances IntelliComplete is not shown for variables that are declared in the beginning of the line.
This happens not always though, so I provide you with an example:As you can see there's a new line in header, when looking in debug mode this line is still there. Intellicomplete for variable a is not shown in this case.
If I remove line // in the header text, Intellicomplete works.
If i do like this:Intellicomplete starts to work. Unfortunately, new line addition is not a desirable solution for us.
Also when i compose this text and set to the Document.Text it works perfectly fine.
We have discovered a bug that is critical to our environment.
In our app we need to set syntaxEditor.Document.HeaderText and syntaxEditor.Document.FooterText along with syntaxEditor.Document.Text.
HeaderText usually ends with xml comment like this:
//<edited name = "text">
It appears that when setting HeaderText it gets trimmed so that document.Text is under comment line (//). Under these circumstances IntelliComplete is not shown for variables that are declared in the beginning of the line.
This happens not always though, so I provide you with an example:
var header =
@"
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Linq;
using System.Linq.Expressions;
namespace n
{
public class cl
{
public void method()
{
try
{
//
";
var text = "System.Activator a; a. ";
var footer =
@"// </edited>
}
finally
{
}
}
}
}
";
syntaxEditor_.Document.HeaderText = header;
syntaxEditor_.Document.FooterText = footer;
syntaxEditor_.Document.Text = text;
If I remove line // in the header text, Intellicomplete works.
If i do like this:
syntaxEditor_.Document.HeaderText = header + "\n";
syntaxEditor_.Document.FooterText = footer;
syntaxEditor_.Document.Text = text;
Also when i compose this text and set to the Document.Text it works perfectly fine.
string text = syntaxEditor_.Document.HeaderText + syntaxEditor_.Document.Text +
syntaxEditor_.Document.FooterText;
syntaxEditor_.Document.FooterText = string.Empty;
syntaxEditor_.Document.HeaderText = string.Empty;
syntaxEditor_.Document.Text = text;