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

Commit 4c7ed0a

Browse files
authored
Merge pull request #93 from x6herbius/auto-indentation-fix
Fixed auto-indentation always using tabs
2 parents a310819 + c6d5f0e commit 4c7ed0a

File tree

6 files changed

+13
-6
lines changed

6 files changed

+13
-6
lines changed

Interop/TranslationProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ private void FillToEnglishDefaults()
757757
HardwareAcc = "Use hardware acceleration (if available)";
758758
UIAnim = "UI animations";
759759
OpenInc = "Auto open includes";
760-
OpenIncRec = "Open Includes Recursivly";
760+
OpenIncRec = "Open Includes Recursively";
761761
AutoUpdate = "Search automatically for updates";
762762
ShowToolbar = "Show toolbar";
763763
DynamicISAC = "Dynamic Autocompletition/Intellisense";

Resources/lang_0_spedit_entryTemplate.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
<hardwareacc>Use hardware acceleration (if available)</hardwareacc>
165165
<uianim>UI animations</uianim>
166166
<openinc>Auto open includes</openinc>
167-
<openincrec>Open Includes Recursivly</openincrec>
167+
<openincrec>Open Includes Recursively</openincrec>
168168
<autoupdate>Search automatically for updates</autoupdate>
169169
<showtoolbar>Show toolbar</showtoolbar>
170170
<dynamicisac>Dynamic Autocompletition/Intellisense</dynamicisac>

UI/Components/EditorIndetation.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,14 @@ public void IndentLine(TextDocument document, DocumentLine line)
3434
}
3535
if (lastLineLastNonWhitespaceChar == '{' && currentLineFirstNonWhitespaceChar != '}')
3636
{
37-
indentation += "\t";
37+
if (Program.OptionsObject.Editor_ReplaceTabsToWhitespace)
38+
{
39+
indentation += new string(' ', Program.OptionsObject.Editor_IndentationSize);
40+
}
41+
else
42+
{
43+
indentation += "\t";
44+
}
3845
}
3946
else if (currentLineFirstNonWhitespaceChar == '}')
4047
{

UI/Windows/AboutWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Text="- Mithat Güner (Turkish translation)" />
7171
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Text="- Reinakumiko (Chinese(simplified) translation)" />
7272
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Text="- dev-xiamu (Chinese(simplified) translation)" />
73-
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Text="- Pohearts (Chinese(simplified & traditional) translation)" />
73+
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Text="- Pohearts (Chinese(simplified and traditional) translation)" />
7474
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,5,0,0" Text="Proposer: &#013;Powerlord; Wliu; barel31; asherkin; BAILANDO; Arkarr; turtsmcgurts; Tank Missile&#013;Wilczek; Miu; StealthGus; WhiteThunder; ghost" />
7575
</StackPanel>
7676
</Grid>

UI/Windows/OptionsWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<CheckBox Name="HardwareAcc" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,5,0,0" Content="Use Hardware Acceleration (if available)" Checked="HardwareAcc_Changed" Unchecked="HardwareAcc_Changed" />
3232
<CheckBox Name="UIAnimation" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,30,0,0" Content="UI Animations" Checked="UIAnimation_Changed" Unchecked="UIAnimation_Changed" />
3333
<CheckBox Name="OpenIncludes" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,55,0,0" Content="Auto Open Includes" Checked="AutoOpenInclude_Changed" Unchecked="AutoOpenInclude_Changed" />
34-
<CheckBox Name="OpenIncludesRecursive" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="25,80,0,0" Content="Open Includes Recursivly" Checked="OpenIncludeRecursivly_Changed" Unchecked="OpenIncludeRecursivly_Changed" />
34+
<CheckBox Name="OpenIncludesRecursive" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="25,80,0,0" Content="Open Includes Recursively" Checked="OpenIncludeRecursively_Changed" Unchecked="OpenIncludeRecursively_Changed" />
3535
<CheckBox Name="AutoUpdate" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,105,0,0" Content="Search automatically for Updates" Checked="AutoUpdate_Changed" Unchecked="AutoUpdate_Changed" />
3636
<CheckBox Name="ShowToolBar" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,130,0,0" Content="Show Toolbar" Checked="ShowToolbar_Changed" Unchecked="ShowToolbar_Changed" />
3737
<CheckBox Name="DynamicISAC" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,155,0,0" Content="Dynamic Autocompletition/Intellisense" Checked="DynamicISAC_Changed" Unchecked="DynamicISAC_Changed" />

UI/Windows/OptionsWindow.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private void AutoOpenInclude_Changed(object sender, RoutedEventArgs e)
6161
Program.OptionsObject.Program_OpenCustomIncludes = OpenIncludes.IsChecked.Value;
6262
OpenIncludesRecursive.IsEnabled = OpenIncludes.IsChecked.Value;
6363
}
64-
private void OpenIncludeRecursivly_Changed(object sender, RoutedEventArgs e)
64+
private void OpenIncludeRecursively_Changed(object sender, RoutedEventArgs e)
6565
{
6666
if (!AllowChanging) { return; }
6767
Program.OptionsObject.Program_OpenIncludesRecursively = OpenIncludesRecursive.IsChecked.Value;

0 commit comments

Comments
 (0)