mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-26 22:01:45 +00:00
Fixed, Script Editor: in some cases unwanted characters were inserted when using keyboard shortcuts.
Fixed, Script Editor: auto-completion was not invokable when typing ACS directives.
This commit is contained in:
parent
002d6e9c89
commit
2b57075212
1 changed files with 39 additions and 10 deletions
|
@ -1017,10 +1017,18 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
{
|
||||
case ScriptStyleType.Comment:
|
||||
case ScriptStyleType.String:
|
||||
case ScriptStyleType.Include:
|
||||
// Hide the list
|
||||
scriptedit.AutoCCancel();
|
||||
return false;
|
||||
|
||||
case ScriptStyleType.Include:
|
||||
// Hide the list unless current word is a keyword
|
||||
if(!start.StartsWith("#"))
|
||||
{
|
||||
scriptedit.AutoCCancel();
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Filter the list
|
||||
|
@ -1360,27 +1368,47 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
// F3 for Find Next
|
||||
if((e.KeyCode == Keys.F3) && (e.Modifiers == Keys.None))
|
||||
{
|
||||
if(OnFindNext != null) OnFindNext();
|
||||
if(OnFindNext != null)
|
||||
{
|
||||
OnFindNext();
|
||||
skiptextinsert = true;
|
||||
}
|
||||
}
|
||||
// F2 for Find Previous (mxd)
|
||||
else if((e.KeyCode == Keys.F2) && (e.Modifiers == Keys.None))
|
||||
{
|
||||
if(OnFindPrevious != null) OnFindPrevious();
|
||||
if(OnFindPrevious != null)
|
||||
{
|
||||
OnFindPrevious();
|
||||
skiptextinsert = true;
|
||||
}
|
||||
}
|
||||
// CTRL+F for find & replace
|
||||
else if((e.KeyCode == Keys.F) && ((e.Modifiers & Keys.Control) == Keys.Control))
|
||||
else if((e.KeyCode == Keys.F) && (e.Modifiers == Keys.Control))
|
||||
{
|
||||
if(OnOpenFindAndReplace != null) OnOpenFindAndReplace();
|
||||
if(OnOpenFindAndReplace != null)
|
||||
{
|
||||
OnOpenFindAndReplace();
|
||||
skiptextinsert = true;
|
||||
}
|
||||
}
|
||||
// CTRL+S for save
|
||||
else if((e.KeyCode == Keys.S) && ((e.Modifiers & Keys.Control) == Keys.Control))
|
||||
else if((e.KeyCode == Keys.S) && (e.Modifiers == Keys.Control))
|
||||
{
|
||||
if(OnExplicitSaveTab != null) OnExplicitSaveTab();
|
||||
if(OnExplicitSaveTab != null)
|
||||
{
|
||||
OnExplicitSaveTab();
|
||||
skiptextinsert = true;
|
||||
}
|
||||
}
|
||||
// CTRL+O for open
|
||||
else if((e.KeyCode == Keys.O) && ((e.Modifiers & Keys.Control) == Keys.Control))
|
||||
else if((e.KeyCode == Keys.O) && (e.Modifiers == Keys.Control))
|
||||
{
|
||||
if(OnOpenScriptBrowser != null) OnOpenScriptBrowser();
|
||||
if(OnOpenScriptBrowser != null)
|
||||
{
|
||||
OnOpenScriptBrowser();
|
||||
skiptextinsert = true;
|
||||
}
|
||||
}
|
||||
// CTRL+Space to autocomplete
|
||||
else if((e.KeyCode == Keys.Space) && (e.Modifiers == Keys.Control))
|
||||
|
@ -1389,7 +1417,8 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
scriptedit.CallTipCancel();
|
||||
|
||||
// Show autocomplete
|
||||
if(ShowAutoCompletionList()) skiptextinsert = true;
|
||||
ShowAutoCompletionList();
|
||||
skiptextinsert = true;
|
||||
}
|
||||
//mxd. Tab to expand code snippet. Do it only when the text cursor is at the end of a keyword.
|
||||
else if(e.KeyCode == Keys.Tab)
|
||||
|
|
Loading…
Reference in a new issue