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

Commit

Permalink
Merge pull request #78 from Hexer10/#67_BrackHighlight_Fix
Browse files Browse the repository at this point in the history
#67 Bracket Highlighting Fixes
  • Loading branch information
maxijabase authored Feb 20, 2021
2 parents f8a6590 + a6c4748 commit 8c28cfa
Show file tree
Hide file tree
Showing 3 changed files with 283 additions and 76 deletions.
3 changes: 2 additions & 1 deletion UI/Components/EditorElement.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@
<CheckBox x:Name="CompileBox" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="2,0,0,0" Content="Compile" Foreground="{DynamicResource BlackColorBrush}" />
<!-- <TextBlock Name="StatusLine_Work" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="100,0,0,0" Text="HERE" Foreground="{DynamicResource BlackColorBrush}" IsHitTestVisible="False" /> -->
<TextBlock Name="StatusLine_FontSize" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="2" Text="14 pt" Foreground="{DynamicResource BlackColorBrush}" IsHitTestVisible="False" />
<TextBlock Name="StatusLine_Coloumn" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="2,2,100,2" Text="Col 0" Foreground="{DynamicResource BlackColorBrush}" IsHitTestVisible="False" />
<TextBlock Name="StatusLine_Column" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="2,2,100,2" Text="Col 0" Foreground="{DynamicResource BlackColorBrush}" IsHitTestVisible="False" />
<TextBlock Name="StatusLine_Offset" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,151,2" Foreground="{DynamicResource BlackColorBrush}" IsHitTestVisible="False" />
<TextBlock Name="StatusLine_Line" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="2,2,200,2" Text="Ln 0" Foreground="{DynamicResource BlackColorBrush}" IsHitTestVisible="False" />
<TextBlock Name="StatusLine_SelectionLength" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="2,2,300,2" Text="Len 0" Foreground="{DynamicResource BlackColorBrush}" />
<Grid Name="ISAC_Grid" Opacity="0" HorizontalAlignment="Left" VerticalAlignment="Top" Height="Auto" IsHitTestVisible="False">
Expand Down
9 changes: 6 additions & 3 deletions UI/Components/EditorElement.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -776,13 +776,16 @@ private void Editor_TextChanged(object sender, EventArgs e)

private void Caret_PositionChanged(object sender, EventArgs e)
{
StatusLine_Coloumn.Text = $"{Program.Translations.GetLanguage("ColAbb")} {editor.TextArea.Caret.Column}";
StatusLine_Column.Text = $"{Program.Translations.GetLanguage("ColAbb")} {editor.TextArea.Caret.Column}";
StatusLine_Line.Text = $"{Program.Translations.GetLanguage("LnAbb")} {editor.TextArea.Caret.Line}";
#if DEBUG
StatusLine_Offset.Text = $"Off {editor.TextArea.Caret.Offset}";
#endif
EvaluateIntelliSense();

var result = bracketSearcher.SearchBracket(editor.Document, editor.CaretOffset);
bracketHighlightRenderer.SetHighlight(result);


if (!Program.OptionsObject.Program_DynamicISAC || Program.MainWindow == null)
{
return;
Expand Down Expand Up @@ -1187,7 +1190,7 @@ public void Language_Translate(bool Initial = false)
CompileBox.Content = Program.Translations.GetLanguage("Compile");
if (!Initial)
{
StatusLine_Coloumn.Text =
StatusLine_Column.Text =
$"{Program.Translations.GetLanguage("ColAbb")} {editor.TextArea.Caret.Column}";
StatusLine_Line.Text = $"{Program.Translations.GetLanguage("LnAbb")} {editor.TextArea.Caret.Line}";
StatusLine_FontSize.Text =
Expand Down
Loading

0 comments on commit 8c28cfa

Please sign in to comment.