From 85035b53e9e035c94cbfec3fe5434972bb1617bd Mon Sep 17 00:00:00 2001
From: "p.kabir"
Date: Tue, 26 May 2020 16:13:02 +0300
Subject: [PATCH] Split on space too
---
Source/ExcelDna.IntelliSense/ToolTipForm.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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;