diff --git a/Source/ExcelDna.IntelliSense/ToolTipForm.cs b/Source/ExcelDna.IntelliSense/ToolTipForm.cs index bb5cb3a..b4e7197 100644 --- a/Source/ExcelDna.IntelliSense/ToolTipForm.cs +++ b/Source/ExcelDna.IntelliSense/ToolTipForm.cs @@ -354,7 +354,7 @@ protected override void OnPaint(PaintEventArgs e) color = _textColor; } - foreach (var text in GetRunParts(run.Text)) // Might split on space too? + foreach (var text in GetRunParts(run.Text)) { if (text == "") continue; @@ -431,7 +431,7 @@ static IEnumerable GetRunParts(string runText) int lastStart = 0; for (int i = 0; i < runText.Length; i++) { - if (runText[i] == ',') + if (runText[i] == ',' || runText[i] == ' ') { yield return runText.Substring(lastStart, i - lastStart + 1); lastStart = i + 1;