Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit 8c28cfa

Browse files
authored
Merge pull request #78 from Hexer10/#67_BrackHighlight_Fix
#67 Bracket Highlighting Fixes
2 parents f8a6590 + a6c4748 commit 8c28cfa

File tree

3 files changed

+283
-76
lines changed

3 files changed

+283
-76
lines changed

UI/Components/EditorElement.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@
7474
<CheckBox x:Name="CompileBox" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2,0,0,0" Content="Compile" Foreground="{DynamicResource BlackColorBrush}" />
7575
<!-- <TextBlock Name="StatusLine_Work" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="100,0,0,0" Text="HERE" Foreground="{DynamicResource BlackColorBrush}" IsHitTestVisible="False" /> -->
7676
<TextBlock Name="StatusLine_FontSize" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="2" Text="14 pt" Foreground="{DynamicResource BlackColorBrush}" IsHitTestVisible="False" />
77-
<TextBlock Name="StatusLine_Coloumn" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="2,2,100,2" Text="Col 0" Foreground="{DynamicResource BlackColorBrush}" IsHitTestVisible="False" />
77+
<TextBlock Name="StatusLine_Column" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="2,2,100,2" Text="Col 0" Foreground="{DynamicResource BlackColorBrush}" IsHitTestVisible="False" />
78+
<TextBlock Name="StatusLine_Offset" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,151,2" Foreground="{DynamicResource BlackColorBrush}" IsHitTestVisible="False" />
7879
<TextBlock Name="StatusLine_Line" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="2,2,200,2" Text="Ln 0" Foreground="{DynamicResource BlackColorBrush}" IsHitTestVisible="False" />
7980
<TextBlock Name="StatusLine_SelectionLength" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="2,2,300,2" Text="Len 0" Foreground="{DynamicResource BlackColorBrush}" />
8081
<Grid Name="ISAC_Grid" Opacity="0" HorizontalAlignment="Left" VerticalAlignment="Top" Height="Auto" IsHitTestVisible="False">

UI/Components/EditorElement.xaml.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -776,13 +776,16 @@ private void Editor_TextChanged(object sender, EventArgs e)
776776

777777
private void Caret_PositionChanged(object sender, EventArgs e)
778778
{
779-
StatusLine_Coloumn.Text = $"{Program.Translations.GetLanguage("ColAbb")} {editor.TextArea.Caret.Column}";
779+
StatusLine_Column.Text = $"{Program.Translations.GetLanguage("ColAbb")} {editor.TextArea.Caret.Column}";
780780
StatusLine_Line.Text = $"{Program.Translations.GetLanguage("LnAbb")} {editor.TextArea.Caret.Line}";
781+
#if DEBUG
782+
StatusLine_Offset.Text = $"Off {editor.TextArea.Caret.Offset}";
783+
#endif
781784
EvaluateIntelliSense();
785+
782786
var result = bracketSearcher.SearchBracket(editor.Document, editor.CaretOffset);
783787
bracketHighlightRenderer.SetHighlight(result);
784788

785-
786789
if (!Program.OptionsObject.Program_DynamicISAC || Program.MainWindow == null)
787790
{
788791
return;
@@ -1187,7 +1190,7 @@ public void Language_Translate(bool Initial = false)
11871190
CompileBox.Content = Program.Translations.GetLanguage("Compile");
11881191
if (!Initial)
11891192
{
1190-
StatusLine_Coloumn.Text =
1193+
StatusLine_Column.Text =
11911194
$"{Program.Translations.GetLanguage("ColAbb")} {editor.TextArea.Caret.Column}";
11921195
StatusLine_Line.Text = $"{Program.Translations.GetLanguage("LnAbb")} {editor.TextArea.Caret.Line}";
11931196
StatusLine_FontSize.Text =

0 commit comments

Comments
 (0)