Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions EditorContext/EditorContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public abstract class EditorContext
{
public string _originalText;
public int _lastParseTopRow;
public int _lastParseHeight;
public int _lastParseRightColumn;
public int _tabWidth;
public bool CanFormat = false;
Expand Down
3 changes: 2 additions & 1 deletion EditorContext/JSONEditorContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public List<ParseResult> ParseJsonToken(string text, List<List<Rune>> Runes)
public override void ParseText(int height, int topRow, int left, int right, string text, List<List<Rune>> Runes)
{
// quick exit when text is the same and the top row / right col has not changed
if (_originalText == text && topRow == _lastParseTopRow && right == _lastParseRightColumn)
if (_originalText == text && topRow == _lastParseTopRow && right == _lastParseRightColumn && _lastParseHeight == height)
{
return;
}
Expand All @@ -144,6 +144,7 @@ public override void ParseText(int height, int topRow, int left, int right, stri
int bottom = topRow + height;
_originalText = text;
_lastParseTopRow = topRow;
_lastParseHeight = height;
_lastParseRightColumn = right;
long count = 0;
var row = 0;
Expand Down
3 changes: 2 additions & 1 deletion EditorContext/MarkdownEditorContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public List<ParseResult> ParseMarkdownToken(string text, List<List<Rune>> Runes)
public override void ParseText(int height, int topRow, int left, int right, string text, List<List<Rune>> Runes)
{
// Quick exit when text is the same and the top row / right col has not changed
if (_originalText == text && topRow == _lastParseTopRow && right == _lastParseRightColumn)
if (_originalText == text && topRow == _lastParseTopRow && right == _lastParseRightColumn && _lastParseHeight == height)
{
return;
}
Expand All @@ -202,6 +202,7 @@ public override void ParseText(int height, int topRow, int left, int right, stri
int bottom = topRow + height;
_originalText = text;
_lastParseTopRow = topRow;
_lastParseHeight = height;
_lastParseRightColumn = right;
var row = 0;

Expand Down
3 changes: 2 additions & 1 deletion EditorContext/PowerShellEditorContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public List<ParseResult> ParsePowershellToken(Token[] tokens, string text, List<
public override void ParseText(int height, int topRow, int left, int right, string text, List<List<Rune>> Runes)
{
// quick exit when text is the same and the top row / right col has not changed
if (_originalText == text && topRow == _lastParseTopRow && right == _lastParseRightColumn)
if (_originalText == text && topRow == _lastParseTopRow && right == _lastParseRightColumn && _lastParseHeight == height)
{
return;
}
Expand All @@ -217,6 +217,7 @@ public override void ParseText(int height, int topRow, int left, int right, stri
int bottom = topRow + height;
_originalText = text;
_lastParseTopRow = topRow;
_lastParseHeight = height;
_lastParseRightColumn = right;
var row = 0;
for (int idxRow = topRow; idxRow < Runes.Count; idxRow++)
Expand Down
3 changes: 2 additions & 1 deletion EditorContext/XmlEditorContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ private void AddParseResult(List<ParseResult> resultList, int lineNumber, int st

public override void ParseText(int height, int topRow, int left, int right, string text, List<List<Rune>> Runes)
{
if (_originalText == text && topRow == _lastParseTopRow && right == _lastParseRightColumn)
if (_originalText == text && topRow == _lastParseTopRow && right == _lastParseRightColumn && _lastParseHeight == height)
{
return;
}
Expand All @@ -408,6 +408,7 @@ public override void ParseText(int height, int topRow, int left, int right, stri
int bottom = topRow + height;
_originalText = text;
_lastParseTopRow = topRow;
_lastParseHeight = height;
_lastParseRightColumn = right;

var row = 0;
Expand Down
3 changes: 2 additions & 1 deletion EditorContext/YamlEditorContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public List<ParseResult> ParseYamlToken(string text, List<List<Rune>> Runes)
}
public override void ParseText(int height, int topRow, int left, int right, string text, List<List<Rune>> Runes)
{
if (_originalText == text && topRow == _lastParseTopRow && right == _lastParseRightColumn)
if (_originalText == text && topRow == _lastParseTopRow && right == _lastParseRightColumn && _lastParseHeight == height)
{
return;
}
Expand All @@ -130,6 +130,7 @@ public override void ParseText(int height, int topRow, int left, int right, stri
int bottom = topRow + height;
_originalText = text;
_lastParseTopRow = topRow;
_lastParseHeight = height;
_lastParseRightColumn = right;
long count = 0;
var row = 0;
Expand Down