OSDN Git Service
(root)
/
fooeditengine
/
FooEditEngine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d679bee
)
矩形選択時に落ちることがあった
author
gdkhd812
<test@yahoo.co.jp>
Sat, 14 Oct 2017 13:45:46 +0000
(22:45 +0900)
committer
gdkhd812
<test@yahoo.co.jp>
Sat, 14 Oct 2017 13:45:46 +0000
(22:45 +0900)
Core/LineToIndex.cs
patch
|
blob
|
history
diff --git
a/Core/LineToIndex.cs
b/Core/LineToIndex.cs
index
71dce51
..
ef32a08
100644
(file)
--- a/
Core/LineToIndex.cs
+++ b/
Core/LineToIndex.cs
@@
-334,8
+334,12
@@
namespace FooEditEngine
/// </summary>
public void ClearLayoutCache(int index,int length)
{
+ if (index >= this.Document.Length)
+ return;
int startRow = this.GetLineNumberFromIndex(index);
int lastIndex = Math.Min(index + length - 1, this.Document.Length - 1);
+ if (lastIndex < 0)
+ lastIndex = 0;
int endRow = this.GetLineNumberFromIndex(lastIndex);
for (int i = startRow; i <= endRow; i++)
this.Lines[i].Dispose();