Browse Source

[BUG_FIXED] Fix "Open in/Move to new instance" issue (closes #709, fixes

the new window always started at top-left corner of screen, and did not remember maximized state.
Now it will use the last saved window position and state.
pull/742/head
Rikk 9 years ago committed by Don Ho
parent
commit
592bd76244
  1. 20
      PowerEditor/src/Notepad_plus.cpp

20
PowerEditor/src/Notepad_plus.cpp

@ -3272,15 +3272,21 @@ void Notepad_plus::docOpenInNewInstance(FileTransferMode mode, int x, int y)
generic_string command = TEXT("\"");
command += nppName;
command += TEXT("\"");
command += TEXT(" \"$(FULL_CURRENT_PATH)\" -multiInst -nosession");
command += TEXT(" \"$(FULL_CURRENT_PATH)\" -multiInst -nosession -x");
TCHAR pX[10], pY[10];
generic_itoa(x, pX, 10);
generic_itoa(y, pY, 10);
if (x) {
TCHAR pX[10];
generic_itoa(x, pX, 10);
command += TEXT(" -x");
command += pX;
}
if (y) {
TCHAR pY[10];
generic_itoa(y, pY, 10);
command += TEXT(" -y");
command += pY;
}
command += pX;
command += TEXT(" -y");
command += pY;
command += TEXT(" -l");
command += ScintillaEditView::langNames[buf->getLangType()].lexerName;
command += TEXT(" -n");

Loading…
Cancel
Save