mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 04:05:42 +08:00
test: try handle cntr-c another way
This commit is contained in:
@@ -150,6 +150,8 @@ namespace OpenSim.Framework.Console
|
||||
m_log.InfoFormat("[LOCAL CONSOLE]: Creating new empty command line history file {0}", m_historyPath);
|
||||
File.Create(m_historyPath).Dispose();
|
||||
}
|
||||
|
||||
System.Console.TreatControlCAsInput = true;
|
||||
}
|
||||
|
||||
private void AddToHistory(string text)
|
||||
@@ -413,7 +415,6 @@ namespace OpenSim.Framework.Console
|
||||
else
|
||||
components = null;
|
||||
}
|
||||
|
||||
}
|
||||
string text;
|
||||
if (components == null || components.Length == 0)
|
||||
@@ -492,6 +493,12 @@ namespace OpenSim.Framework.Console
|
||||
Show();
|
||||
|
||||
ConsoleKeyInfo key = System.Console.ReadKey(true);
|
||||
|
||||
if((key.Modifiers & ConsoleModifiers.Control) != 0 && key.Key == ConsoleKey.C)
|
||||
{
|
||||
LocalCancelKeyPressed();
|
||||
return string.Empty;
|
||||
}
|
||||
char enteredChar = key.KeyChar;
|
||||
|
||||
if (!Char.IsControl(enteredChar))
|
||||
|
||||
Reference in New Issue
Block a user