Nano更新

This commit is contained in:
2026-03-14 15:27:44 +08:00
parent b3fff31b28
commit 3e196e7b51
3 changed files with 16 additions and 16 deletions

View File

@@ -1 +1 @@
2026-03-14 03:27:01
2026-03-14 15:24:06

View File

@@ -1 +1 @@
b507c57
b3fff31

View File

@@ -535,7 +535,7 @@ namespace CMLeonOS
{
string line = lines[currentLine];
if (IsLuaFile() && settings.EnableSmartIndent)
if (settings.EnableSmartIndent)
{
string currentIndent = GetLineIndent(line);
@@ -549,11 +549,14 @@ namespace CMLeonOS
lines[currentLine] = line.Remove(linePos, line.Length - linePos);
}
if (IsLuaFile())
{
if (line.TrimEnd().EndsWith("then") || line.TrimEnd().EndsWith("do") || line.TrimEnd().EndsWith("else") || line.TrimEnd().EndsWith("elseif") || line.TrimEnd().EndsWith("repeat"))
{
lines[currentLine + 1] = lines[currentLine + 1] + " ";
}
}
}
else
{
if (linePos == line.Length)
@@ -604,10 +607,7 @@ namespace CMLeonOS
{
char c = text[i];
if (IsLuaFile())
{
c = HandleLuaAutoComplete(c);
}
c = HandleAutoComplete(c);
lines[currentLine] = lines[currentLine].Insert(linePos, c.ToString());
linePos++;
@@ -618,7 +618,7 @@ namespace CMLeonOS
modified = true;
}
private char HandleLuaAutoComplete(char c)
private char HandleAutoComplete(char c)
{
string line = lines[currentLine];
@@ -688,7 +688,7 @@ namespace CMLeonOS
}
else
{
if (IsLuaFile() && settings.EnableSmartDelete)
if (settings.EnableSmartDelete)
{
string line = lines[currentLine];
char charToDelete = line[linePos - 1];
@@ -1361,11 +1361,11 @@ namespace CMLeonOS
string title = " Nano Settings";
string[] options = new string[]
{
"1. Smart Indent",
"2. Auto Complete Brackets",
"3. Auto Complete Quotes",
"4. Smart Delete",
"5. Syntax Highlight",
"1. Smart Indent (All Files)",
"2. Auto Complete Brackets (All Files)",
"3. Auto Complete Quotes (All Files)",
"4. Smart Delete (All Files)",
"5. Syntax Highlight (Lua Only)",
"6. Save and Exit"
};