FModel v4.2

This commit is contained in:
iAmAsval 2021-12-16 23:43:23 +01:00
parent 7978d58e71
commit 609e3e6e33
3 changed files with 7 additions and 11 deletions

View File

@ -5,9 +5,9 @@
<TargetFramework>net6.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<ApplicationIcon>FModel.ico</ApplicationIcon>
<Version>4.1.0</Version>
<AssemblyVersion>4.1.0.2</AssemblyVersion>
<FileVersion>4.1.0.2</FileVersion>
<Version>4.2.0</Version>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<FileVersion>4.2.0.0</FileVersion>
<IsPackable>false</IsPackable>
<IsPublishable>true</IsPublishable>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>

View File

@ -109,7 +109,7 @@
</Viewbox>
</Button>
</Grid>
<avalonEdit:TextEditor x:Name="MyAvalonEditor" Grid.Row="0" Grid.RowSpan="2" SyntaxHighlighting="{Binding Highlighter}" Document="{Binding Document}"
FontFamily="Consolas" FontSize="{Binding FontSize}" IsReadOnly="True" ShowLineNumbers="True" Foreground="#DAE5F2"
Background="{DynamicResource {x:Static adonisUi:Brushes.Layer3BackgroundBrush}}" PreviewMouseWheel="OnPreviewMouseWheel"

View File

@ -27,13 +27,9 @@ namespace FModel.Views.Resources.Controls
private readonly Dictionary<string, NavigationList<int>> _savedCarets = new();
private NavigationList<int> _caretsOffsets
{
get
{
if (MyAvalonEditor.Document != null)
return _savedCarets.GetOrAdd(MyAvalonEditor.Document.FileName, () => new NavigationList<int>());
else
return new NavigationList<int>();
}
get => MyAvalonEditor.Document != null
? _savedCarets.GetOrAdd(MyAvalonEditor.Document.FileName, () => new NavigationList<int>())
: new NavigationList<int>();
}
private bool _ignoreCaret = true;