Skip to content

Commit 1a2f6eb

Browse files
committed
Fixed AssemblyFileVersion + indentation bug
1 parent a5358fb commit 1a2f6eb

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

WebEdit/Main.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ internal static void ReplaceTag()
265265
}
266266

267267
long selStart = scintillaGateway.GetSelectionStart();
268-
long indentPos = Math.Min(scintillaGateway.GetLineIndentPosition(lineStart), selStart);
268+
long indentPos = Math.Min(lineStart + (scintillaGateway.GetUseTabs() ? (scintillaGateway.GetLineIndentation(lineCurrent) / scintillaGateway.GetTabWidth()) : scintillaGateway.GetLineIndentation(lineCurrent)), selStart);
269269
Tags parser = new(lineStart, indentPos);
270270
// scintillaGateway.ReplaceSel(Tags.UserDefinedInsertionPoint().Replace(value, string.Empty));
271271
bool isUDInsPoint = Tags.UserDefinedInsertionPoint().IsMatch(value);

WebEdit/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@
2828
// by using the '*' as shown below:
2929
// [assembly: AssemblyVersion("1.0.*")]
3030
[assembly: AssemblyVersion("2.8.1.0")]
31-
[assembly: AssemblyFileVersion("2.1.0.0")]
31+
[assembly: AssemblyFileVersion("2.8.1.0")]
3232
[assembly: AssemblyInformationalVersion("2.8.1.0")]

WebEdit/Tags.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ internal string Unescape(string value)
3030
StringBuilder text = new(value);
3131
ScintillaGateway sci = new(Utils.GetCurrentScintilla());
3232
sci.SetTargetRange(_tabStartPos, _tabEndPos);
33-
// string indent = sci.GetTargetText();
33+
string indent = sci.GetTargetText();
3434
// literal DOS EOL
35-
text.Replace("\\r\\n", $"\r\n{sci.LineDelimiter}"); // ORIG: $"\r\n{indent}" (???) <-- Unexpected Behavior: the pre-cursor text (code in the given line) also inserted into the next line
35+
text.Replace("\\r\\n", $"\r\n{indent}");
3636
// literal carriage return
37-
text.Replace("\\r", $"\r{sci.LineDelimiter}"); // ORIG: $"\r{indent}" <-- See above
37+
text.Replace("\\r", $"\r{indent}");
3838
// document-specific EOL
39-
text.Replace("\\n", $"{sci.LineDelimiter}"); // ORIG: $"{sci.LineDelimiter}{indent}" <-- See above
39+
text.Replace("\\n", $"{sci.LineDelimiter}{indent}");
4040
text.Replace("\\t", "\t");
4141
text.Replace("\\|", "|");
4242
text.Replace("\\\\", "\\");

0 commit comments

Comments
 (0)