mirror of
https://github.com/buggins/dlangide.git
synced 2025-04-25 20:49:56 +03:00
fix slow closing of window under win32; additional fix to focus editor for #292
This commit is contained in:
parent
bf0e340e16
commit
f977636742
2 changed files with 5 additions and 1 deletions
2
dub.json
2
dub.json
|
@ -12,7 +12,7 @@
|
|||
"stringImportPaths": ["views"],
|
||||
|
||||
"dependencies": {
|
||||
"dlangui": "==0.9.131",
|
||||
"dlangui": "==0.9.132",
|
||||
"dsymbol": "~>0.2.9",
|
||||
"dcd": "~>0.9.1"
|
||||
},
|
||||
|
|
|
@ -898,6 +898,7 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
|
|||
case IDEActions.WindowCloseAllDocuments:
|
||||
case IDEActions.FileSaveAll:
|
||||
case IDEActions.FileSaveAs:
|
||||
case IDEActions.GotoLine:
|
||||
a.state = (currentEditor !is null && !_currentBackgroundOperation) ? ACTION_STATE_ENABLED : ACTION_STATE_DISABLE;
|
||||
return true;
|
||||
default:
|
||||
|
@ -1092,13 +1093,16 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
|
|||
auto num = to!uint(s);
|
||||
// Check line existence
|
||||
if (num < 1 || num > currentEditor.content.length) {
|
||||
currentEditor.setFocus();
|
||||
window.showMessageBox(UIString.fromId("ERROR"c), UIString.fromId("ERROR_NO_SUCH_LINE"c));
|
||||
return;
|
||||
}
|
||||
// Go to line
|
||||
currentEditor.setCaretPos(num - 1, 0);
|
||||
currentEditor.setFocus();
|
||||
}
|
||||
catch (ConvException e) {
|
||||
currentEditor.setFocus();
|
||||
window.showMessageBox(UIString.fromId("ERROR"c), UIString.fromId("ERROR_INVALID_NUMBER"c));
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue