Hi ๐, I'm Jean
jsleroy / compare-plugin Goto Github PK
View Code? Open in Web Editor NEWCompare plugin for Notepad++
License: GNU General Public License v3.0
Compare plugin for Notepad++
License: GNU General Public License v3.0
STR:
Open two files.
Change anything in one file (do not save).
Compare to last Save.
Clear Results.
Result:
The temp file is not discarded.
Hello jsleroy,
Ede123 has kindly referred me to this repo.
I regularly use Compare and I'd like to sincerely thank you for your great work.
I'm about to open some issues here and I (and many others) would highly appreciate it if you could find some time to have a look and help.
The Compare Plugin is indispensable and your country needs you! :)
Best regards.
Issue by Yaron10
Thursday Mar 10, 2016 at 20:57 GMT
Originally opened as pnedev/comparePlus#6
I've removed the three blocks starting with
::EnableMenuItem(hMenu, funcItem[CMD_PREV]._cmdID
Other commands are not enabled/disabled. Why those?
Thank you.
Issue by Yaron10
Thursday Mar 10, 2016 at 19:05 GMT
Originally opened as pnedev/comparePlus#1
When comparing In One-View mode, the current file and the previous file should be compared.
Also, the current file should always get the top (or left) view.
NOTE:
This fix (current at top) does not address "Compare to last Save".
I've never used "Compare to Git".
Replace
if(!IsWindowVisible(nppData._scintillaMainHandle) || !IsWindowVisible(nppData._scintillaSecondHandle))
{
skipAutoReset = true;
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_GOTO_ANOTHER_VIEW, 0);
skipAutoReset = false;
panelsOpened = true;
}
with
if(!IsWindowVisible(nppData._scintillaMainHandle) || !IsWindowVisible(nppData._scintillaSecondHandle)) // Yaron - One-View mode.
{
skipAutoReset = true;
// Yaron - In One-View mode, the current view can be 0 or 1.
// In Two-Views mode, the top (or left) view is ALWAYS 0, and the bottom view is ALWAYS 1.
int currentView = SendMessage(nppData._nppHandle, NPPM_GETCURRENTVIEW, 0, 0);
LRESULT bufferID = SendMessage(nppData._nppHandle, NPPM_GETCURRENTBUFFERID, 0, 0);
// Yaron - If the current view is 0, we want the prev file to be moved to the bottom; if the current view is 1, we still need to activate it and make sure it's compared to the current file.
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_TAB_PREV, 0);
if(currentView == 1)
{
bufferID = SendMessage(nppData._nppHandle, NPPM_GETCURRENTBUFFERID, 0, 0);
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_TAB_NEXT, 0); // Yaron - Switch back to current file.
}
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_GOTO_ANOTHER_VIEW, 0); // Yaron - Current file is ALWAYS at top, and prev file is ALWAYS at bottom.
activateBufferID(bufferID, currentView); // Yaron - If the current view is 0, activate current file at top; if the current view is 1, activate prev file at bottom (possibly multiple files there).
if (currentView == 1)
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_SWITCHTO_OTHER_VIEW, 0); // Yaron - Activate current file at top.
skipAutoReset = false;
panelsOpened = true;
}
and add the following function
void activateBufferID(LRESULT bufferID, int view)
{
LRESULT index = SendMessage(nppData._nppHandle, NPPM_GETPOSFROMBUFFERID, bufferID, view);
index = index & 0x3FFFFFFF;
SendMessage(nppData._nppHandle, NPPM_ACTIVATEDOC, view, index);
}
Thank you.
STR:
Result:
We're still in Two-Views mode.
Issue by Yaron10
Friday Mar 18, 2016 at 02:30 GMT
Originally opened as pnedev/comparePlus#16
A new extra Status Bar for Compare could be useful.
It should have the following segments:
Total diffs.
No. of added lines.
No. of removed lines.
No. of not equal lines.
No. of moved lines.
Various messages: "No files to compare.", "Can not locate Git." etc.
A small Progress Bar.
Pressing "Clear Results" should terminate the process and close the status bar.
Originally opened in:
#9
Hello,
in the last version of the plugin the new keyboard shortcut (Ctrl+Alt+C) is causing my OS ( Windows 7 and 10) to open the shutdown dialog after closing all my opened application, while the old combination (Alt+D) was working fine.
Is possible to have an option to set the shortcuts?
Issue by Yaron10
Thursday Mar 10, 2016 at 19:06 GMT
Originally opened as pnedev/comparePlus#3
Replace
funcItem[CMD_COMPARE_LAST_SAVE]._pFunc = compareLocal;
lstrcpy(funcItem[CMD_COMPARE_LAST_SAVE]._itemName, TEXT("Compare to last save"));
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey = new ShortcutKey;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_isAlt = true;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_isCtrl = false;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_isShift = false;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_key = 'S';
funcItem[CMD_COMPARE_LAST_SAVE]._init2Check = false;
funcItem[CMD_COMPARE_SVN_BASE]._pFunc = compareSvnBase;
lstrcpy(funcItem[CMD_COMPARE_SVN_BASE]._itemName, TEXT("Compare against SVN base"));
funcItem[CMD_COMPARE_SVN_BASE]._pShKey = new ShortcutKey;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_isAlt = true;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_isCtrl = false;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_isShift = false;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_key = 'B';
funcItem[CMD_COMPARE_SVN_BASE]._init2Check = false;
funcItem[CMD_COMPARE_GIT_BASE]._pFunc = compareGitBase;
lstrcpy(funcItem[CMD_COMPARE_GIT_BASE]._itemName, TEXT("Compare against GIT base"));
funcItem[CMD_COMPARE_GIT_BASE]._pShKey = new ShortcutKey;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_isAlt = true;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_isCtrl = true;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_isShift = false;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_key = 'B';
funcItem[CMD_COMPARE_GIT_BASE]._init2Check = false;
funcItem[CMD_SEPARATOR_2]._pFunc = NULL;
lstrcpy(funcItem[CMD_SEPARATOR_2]._itemName, TEXT("------------"));
funcItem[CMD_SEPARATOR_2]._pShKey = NULL;
funcItem[CMD_ALIGN_MATCHES]._pFunc = alignMatches;
lstrcpy(funcItem[CMD_ALIGN_MATCHES]._itemName, TEXT("Align Matches"));
funcItem[CMD_ALIGN_MATCHES]._pShKey = NULL;
funcItem[CMD_ALIGN_MATCHES]._init2Check = false;
funcItem[CMD_IGNORE_SPACING]._pFunc = includeSpacing;
lstrcpy(funcItem[CMD_IGNORE_SPACING]._itemName, TEXT("Ignore Spacing"));
funcItem[CMD_IGNORE_SPACING]._pShKey = NULL;
funcItem[CMD_IGNORE_SPACING]._init2Check = false;
funcItem[CMD_DETECT_MOVES]._pFunc = detectMoves;
lstrcpy(funcItem[CMD_DETECT_MOVES]._itemName, TEXT("Detect Moves"));
funcItem[CMD_DETECT_MOVES]._pShKey = NULL;
funcItem[CMD_DETECT_MOVES]._init2Check = false;
funcItem[CMD_USE_NAV_BAR]._pFunc = ViewNavigationBar;
lstrcpy(funcItem[CMD_USE_NAV_BAR]._itemName, TEXT("Navigation bar"));
funcItem[CMD_USE_NAV_BAR]._pShKey = NULL;
funcItem[CMD_USE_NAV_BAR]._init2Check = false;
funcItem[CMD_SEPARATOR_3]._pFunc = NULL;
lstrcpy(funcItem[CMD_SEPARATOR_3]._itemName, TEXT("-----------"));
funcItem[CMD_SEPARATOR_3]._pShKey = NULL;
funcItem[CMD_PREV]._pFunc = Prev;
lstrcpy(funcItem[CMD_PREV]._itemName, TEXT("Previous"));
funcItem[CMD_PREV]._pShKey = new ShortcutKey;
funcItem[CMD_PREV]._pShKey->_isAlt = false;
funcItem[CMD_PREV]._pShKey->_isCtrl = true;
funcItem[CMD_PREV]._pShKey->_isShift = false;
funcItem[CMD_PREV]._pShKey->_key = VK_PRIOR;
funcItem[CMD_PREV]._init2Check = false;
funcItem[CMD_NEXT]._pFunc = Next;
lstrcpy(funcItem[CMD_NEXT]._itemName, TEXT("Next"));
funcItem[CMD_NEXT]._pShKey = new ShortcutKey;
funcItem[CMD_NEXT]._pShKey->_isAlt = false;
funcItem[CMD_NEXT]._pShKey->_isCtrl = true;
funcItem[CMD_NEXT]._pShKey->_isShift = false;
funcItem[CMD_NEXT]._pShKey->_key = VK_NEXT;
funcItem[CMD_NEXT]._init2Check = false;
funcItem[CMD_FIRST]._pFunc = First;
lstrcpy(funcItem[CMD_FIRST]._itemName, TEXT("First"));
funcItem[CMD_FIRST]._pShKey = new ShortcutKey;
funcItem[CMD_FIRST]._pShKey->_isAlt = false;
funcItem[CMD_FIRST]._pShKey->_isCtrl = true;
funcItem[CMD_FIRST]._pShKey->_isShift = true;
funcItem[CMD_FIRST]._pShKey->_key = VK_PRIOR;
funcItem[CMD_FIRST]._init2Check = false;
funcItem[CMD_LAST]._pFunc = Last;
lstrcpy(funcItem[CMD_LAST]._itemName, TEXT("Last"));
funcItem[CMD_LAST]._pShKey = new ShortcutKey;
funcItem[CMD_LAST]._pShKey->_isAlt = false;
funcItem[CMD_LAST]._pShKey->_isCtrl = true;
funcItem[CMD_LAST]._pShKey->_isShift = true;
funcItem[CMD_LAST]._pShKey->_key = VK_NEXT;
funcItem[CMD_LAST]._init2Check = false;
funcItem[CMD_SEPARATOR_4]._pFunc = NULL;
lstrcpy(funcItem[CMD_SEPARATOR_4]._itemName, TEXT("-----------"));
funcItem[CMD_SEPARATOR_4]._pShKey = NULL;
funcItem[CMD_OPTION]._pFunc = openOptionDlg;
lstrcpy(funcItem[CMD_OPTION]._itemName, TEXT("Option"));
funcItem[CMD_OPTION]._pShKey = NULL;
funcItem[CMD_OPTION]._init2Check = false;
with
funcItem[CMD_COMPARE_LAST_SAVE]._pFunc = compareLocal;
lstrcpy(funcItem[CMD_COMPARE_LAST_SAVE]._itemName, TEXT("Compare to last Save"));
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey = new ShortcutKey;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_isAlt = true;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_isCtrl = false;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_isShift = false;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_key = 'S';
funcItem[CMD_COMPARE_LAST_SAVE]._init2Check = false;
funcItem[CMD_COMPARE_SVN_BASE]._pFunc = compareSvnBase;
lstrcpy(funcItem[CMD_COMPARE_SVN_BASE]._itemName, TEXT("Compare to SVN base"));
funcItem[CMD_COMPARE_SVN_BASE]._pShKey = new ShortcutKey;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_isAlt = true;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_isCtrl = false;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_isShift = false;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_key = 'B';
funcItem[CMD_COMPARE_SVN_BASE]._init2Check = false;
funcItem[CMD_COMPARE_GIT_BASE]._pFunc = compareGitBase;
lstrcpy(funcItem[CMD_COMPARE_GIT_BASE]._itemName, TEXT("Compare to GIT base"));
funcItem[CMD_COMPARE_GIT_BASE]._pShKey = new ShortcutKey;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_isAlt = true;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_isCtrl = true;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_isShift = false;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_key = 'G'; // Yaron
funcItem[CMD_COMPARE_GIT_BASE]._init2Check = false;
funcItem[CMD_SEPARATOR_2]._pFunc = NULL;
lstrcpy(funcItem[CMD_SEPARATOR_2]._itemName, TEXT("------------"));
funcItem[CMD_SEPARATOR_2]._pShKey = NULL;
funcItem[CMD_ALIGN_MATCHES]._pFunc = alignMatches;
lstrcpy(funcItem[CMD_ALIGN_MATCHES]._itemName, TEXT("Align Matches"));
funcItem[CMD_ALIGN_MATCHES]._pShKey = NULL;
funcItem[CMD_ALIGN_MATCHES]._init2Check = false;
funcItem[CMD_IGNORE_SPACING]._pFunc = includeSpacing;
lstrcpy(funcItem[CMD_IGNORE_SPACING]._itemName, TEXT("Ignore Spacing"));
funcItem[CMD_IGNORE_SPACING]._pShKey = NULL;
funcItem[CMD_IGNORE_SPACING]._init2Check = false;
funcItem[CMD_DETECT_MOVES]._pFunc = detectMoves;
lstrcpy(funcItem[CMD_DETECT_MOVES]._itemName, TEXT("Detect Moves"));
funcItem[CMD_DETECT_MOVES]._pShKey = NULL;
funcItem[CMD_DETECT_MOVES]._init2Check = false;
funcItem[CMD_USE_NAV_BAR]._pFunc = ViewNavigationBar;
lstrcpy(funcItem[CMD_USE_NAV_BAR]._itemName, TEXT("Navigation Bar"));
funcItem[CMD_USE_NAV_BAR]._pShKey = NULL;
funcItem[CMD_USE_NAV_BAR]._init2Check = false;
funcItem[CMD_SEPARATOR_3]._pFunc = NULL;
lstrcpy(funcItem[CMD_SEPARATOR_3]._itemName, TEXT("-----------"));
funcItem[CMD_SEPARATOR_3]._pShKey = NULL;
funcItem[CMD_PREV]._pFunc = Prev;
lstrcpy(funcItem[CMD_PREV]._itemName, TEXT("Previous"));
funcItem[CMD_PREV]._pShKey = new ShortcutKey;
funcItem[CMD_PREV]._pShKey->_isAlt = true; // Yaron
funcItem[CMD_PREV]._pShKey->_isCtrl = false;
funcItem[CMD_PREV]._pShKey->_isShift = false;
funcItem[CMD_PREV]._pShKey->_key = VK_PRIOR;
funcItem[CMD_PREV]._init2Check = false;
funcItem[CMD_NEXT]._pFunc = Next;
lstrcpy(funcItem[CMD_NEXT]._itemName, TEXT("Next"));
funcItem[CMD_NEXT]._pShKey = new ShortcutKey;
funcItem[CMD_NEXT]._pShKey->_isAlt = true; // Yaron
funcItem[CMD_NEXT]._pShKey->_isCtrl = false;
funcItem[CMD_NEXT]._pShKey->_isShift = false;
funcItem[CMD_NEXT]._pShKey->_key = VK_NEXT;
funcItem[CMD_NEXT]._init2Check = false;
funcItem[CMD_FIRST]._pFunc = First;
lstrcpy(funcItem[CMD_FIRST]._itemName, TEXT("First"));
funcItem[CMD_FIRST]._pShKey = new ShortcutKey;
funcItem[CMD_FIRST]._pShKey->_isAlt = true; // Yaron
funcItem[CMD_FIRST]._pShKey->_isCtrl = true;
funcItem[CMD_FIRST]._pShKey->_isShift = false;
funcItem[CMD_FIRST]._pShKey->_key = VK_PRIOR;
funcItem[CMD_FIRST]._init2Check = false;
funcItem[CMD_LAST]._pFunc = Last;
lstrcpy(funcItem[CMD_LAST]._itemName, TEXT("Last"));
funcItem[CMD_LAST]._pShKey = new ShortcutKey;
funcItem[CMD_LAST]._pShKey->_isAlt = true; // Yaron
funcItem[CMD_LAST]._pShKey->_isCtrl = true;
funcItem[CMD_LAST]._pShKey->_isShift = false;
funcItem[CMD_LAST]._pShKey->_key = VK_NEXT;
funcItem[CMD_LAST]._init2Check = false;
funcItem[CMD_SEPARATOR_4]._pFunc = NULL;
lstrcpy(funcItem[CMD_SEPARATOR_4]._itemName, TEXT("-----------"));
funcItem[CMD_SEPARATOR_4]._pShKey = NULL;
funcItem[CMD_OPTION]._pFunc = openOptionDlg;
lstrcpy(funcItem[CMD_OPTION]._itemName, TEXT("Options")); // Yaron
funcItem[CMD_OPTION]._pShKey = NULL;
funcItem[CMD_OPTION]._init2Check = false;
Thank you.
I downloaded the latest version of Notepad++ (7.3.2) and Compare plugin (2.0.0). I noticed that the shortcut keys are changed (like instead of ALT+D I have to do CTRL+ALT+C) I also noticed that CTRL+ALT+SHIFT+X that is supposed to clear all compares is a reserved shortcut for Notepad++ (RUN -> Launch in FireFox). Now the question is, is there a way to customize the shortcut keys? and if yes, How?
Issue by Yaron10
Thursday Mar 10, 2016 at 19:05 GMT
Originally opened as pnedev/comparePlus#1
When comparing In One-View mode, the current file and the previous file should be compared.
Also, the current file should always get the top (or left) view.
NOTE:
This fix (current at top) does not address "Compare to last Save".
I've never used "Compare to Git".
Replace
if(!IsWindowVisible(nppData._scintillaMainHandle) || !IsWindowVisible(nppData._scintillaSecondHandle))
{
skipAutoReset = true;
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_GOTO_ANOTHER_VIEW, 0);
skipAutoReset = false;
panelsOpened = true;
}
with
if(!IsWindowVisible(nppData._scintillaMainHandle) || !IsWindowVisible(nppData._scintillaSecondHandle)) // Yaron - One-View mode.
{
skipAutoReset = true;
// Yaron - In One-View mode, the current view can be 0 or 1.
// In Two-Views mode, the top (or left) view is ALWAYS 0, and the bottom view is ALWAYS 1.
int currentView = SendMessage(nppData._nppHandle, NPPM_GETCURRENTVIEW, 0, 0);
LRESULT bufferID = SendMessage(nppData._nppHandle, NPPM_GETCURRENTBUFFERID, 0, 0);
// Yaron - If the current view is 0, we want the prev file to be moved to the bottom; if the current view is 1, we still need to activate it and make sure it's compared to the current file.
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_TAB_PREV, 0);
if(currentView == 1)
{
bufferID = SendMessage(nppData._nppHandle, NPPM_GETCURRENTBUFFERID, 0, 0);
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_TAB_NEXT, 0); // Yaron - Switch back to current file.
}
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_GOTO_ANOTHER_VIEW, 0); // Yaron - Current file is ALWAYS at top, and prev file is ALWAYS at bottom.
activateBufferID(bufferID, currentView); // Yaron - If the current view is 0, activate current file at top; if the current view is 1, activate prev file at bottom (possibly multiple files there).
if (currentView == 1)
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_SWITCHTO_OTHER_VIEW, 0); // Yaron - Activate current file at top.
skipAutoReset = false;
panelsOpened = true;
}
and add the following function
void activateBufferID(LRESULT bufferID, int view)
{
LRESULT index = SendMessage(nppData._nppHandle, NPPM_GETPOSFROMBUFFERID, bufferID, view);
index = index & 0x3FFFFFFF;
SendMessage(nppData._nppHandle, NPPM_ACTIVATEDOC, view, index);
}
Thank you.
Issue by Yaron10
Thursday Mar 10, 2016 at 19:05 GMT
Originally opened as pnedev/comparePlus#2
Replace
if(!different)
{
::MessageBox(nppData._nppHandle, TEXT("Files Match"), TEXT("Results :"), MB_OK);
return true;
}
with
if (!different)
{
if (::MessageBox(nppData._nppHandle, TEXT("Files match.\n\nClose compared files?"), TEXT("Compare Plugin"), MB_YESNO | MB_ICONQUESTION/* | MB_DEFBUTTON2 */) == IDYES) // Yaron - An option to close compared files.
{
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_FILE_CLOSE, 0);
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_SWITCHTO_OTHER_VIEW, 0);
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_FILE_CLOSE, 0);
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_SWITCHTO_OTHER_VIEW, 0);
}
return true;
}
Personally I prefer "Yes" to be the default button.
Uncomment | MB_DEFBUTTON2
if you think "No" should be default.
Thank you.
Issue by Yaron10
Thursday Mar 10, 2016 at 19:06 GMT
Originally opened as pnedev/comparePlus#4
After the line
FlashWindowEx(&flashInfo);
add
MessageBeep(MB_OK); // Yaron - Sound notification.
Thank you.
I have been using this plugin with fantastic results for a few years. I'd really like to be able to export the results in WYSIWYG fashion to html or pdf (or anything, really), so that I can share them with my clients.
From Notepad++ 6.x on, syntax highlighting is lost upon comparison of files. There are several bug reports about it on Source Forge. Possibly you din't see them, yet. For example this one:
http://sourceforge.net/p/notepad-plus/bugs/4119/
Reverting to previous older of your awesome Compare Plugin doesn't fix the issue. If you're still working on this project, this fix would be really great and useful to lots of users in the "npp community" If you can point me into a direction, I'd try finding the cause myself, but I'm a beginner concerning C++ :-/
Also, it would be great having the binaries/DLLs for version 1.5.7
http://sourceforge.net/projects/npp-compare/forums/forum/1815517/topic/6628399
Cheers,
Simon
Issue by xylographe
Tuesday Apr 12, 2016 at 01:57 GMT
Originally opened as pnedev/comparePlus#47
In single view the order of files is changed after "Clear Compare". This behaviour is rather annoying. ๐
It would be desirable to restore the original file order after compare.
Example 1:
Alt+F
Alt+D
Alt+Shift+D
(back to single view)The file order has changed to A, B, D, C (from left to right).
Example 2:
Alt+F
Alt+D
Alt+Shift+D
(back to single view)The file order has changed to A, C, D, B.
[originally inappropriately reported in this comment]
Issue by Yaron10
Thursday Mar 10, 2016 at 19:06 GMT
Originally opened as pnedev/comparePlus#5
Replace
/* sync pannels */
HMENU hMenu = ::GetMenu(nppData._nppHandle);
syncScrollVwasChecked = (::GetMenuState(hMenu, IDM_VIEW_SYNSCROLLV, MF_BYCOMMAND) & MF_CHECKED) != 0;
syncScrollHwasChecked = (::GetMenuState(hMenu, IDM_VIEW_SYNSCROLLH, MF_BYCOMMAND) & MF_CHECKED) != 0;
if (syncScrollVwasChecked)
::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLV, 0), 0);
if (syncScrollHwasChecked)
::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLH, 0), 0);
// let the second view inherit the zoom level of the main view
int mainZoomLevel = SendMessage(nppData._scintillaMainHandle, SCI_GETZOOM, 0, 0);
SendMessage(nppData._scintillaSecondHandle, SCI_SETZOOM, mainZoomLevel, 0);
::SendMessageA(nppData._scintillaMainHandle, SCI_GOTOPOS, 1, 0);
::SendMessageA(nppData._scintillaSecondHandle, SCI_GOTOPOS, 1, 0);
::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLH, 0), 0);
::SendMessageA(nppData._scintillaMainHandle, SCI_SETUNDOCOLLECTION, FALSE, 0);
::SendMessageA(nppData._scintillaSecondHandle, SCI_SETUNDOCOLLECTION, FALSE, 0);
with
// Yaron - Change code location.
::SendMessageA(nppData._scintillaMainHandle, SCI_GOTOPOS, 0, 0); // Yaron - pos 0, 0. Why 1, 0?
::SendMessageA(nppData._scintillaSecondHandle, SCI_GOTOPOS, 0, 0);
//::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLV, 0), 0); // Yaron - Not nedded.
::SendMessageA(nppData._scintillaMainHandle, SCI_SETUNDOCOLLECTION, FALSE, 0);
::SendMessageA(nppData._scintillaSecondHandle, SCI_SETUNDOCOLLECTION, FALSE, 0);
/* sync pannels */
HMENU hMenu = ::GetMenu(nppData._nppHandle);
syncScrollVwasChecked = (::GetMenuState(hMenu, IDM_VIEW_SYNSCROLLV, MF_BYCOMMAND) & MF_CHECKED) != 0;
syncScrollHwasChecked = (::GetMenuState(hMenu, IDM_VIEW_SYNSCROLLH, MF_BYCOMMAND) & MF_CHECKED) != 0;
if (syncScrollVwasChecked) // Yaron - Disable vertical scroll sync. Use "case SCN_UPDATEUI:".
::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLV, 0), 0);
if (!syncScrollHwasChecked) // Yaron - Enable horizontal scroll sync.
::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLH, 0), 0);
// let the second view inherit the zoom level of the main view
int mainZoomLevel = SendMessage(nppData._scintillaMainHandle, SCI_GETZOOM, 0, 0);
SendMessage(nppData._scintillaSecondHandle, SCI_SETZOOM, mainZoomLevel, 0);
Why call
if (syncScrollHwasChecked)
::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLH, 0), 0);
and then again
::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLH, 0), 0);
? - Do it once.
NOTE: I've also changed SCI_GOTOPOS, 1, 0);
to SCI_GOTOPOS, 0, 0);
.
What do you think?
Thank you.
From @Yaron10 on March 10, 2016 19:5
Replace
if(!different)
{
::MessageBox(nppData._nppHandle, TEXT("Files Match"), TEXT("Results :"), MB_OK);
return true;
}
with
if (!different)
{
if (::MessageBox(nppData._nppHandle, TEXT("Files match.\n\nClose compared files?"), TEXT("Compare Plugin"), MB_YESNO | MB_ICONQUESTION/* | MB_DEFBUTTON2 */) == IDYES) // Yaron - An option to close compared files.
{
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_FILE_CLOSE, 0);
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_SWITCHTO_OTHER_VIEW, 0);
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_FILE_CLOSE, 0);
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_SWITCHTO_OTHER_VIEW, 0);
}
return true;
}
Personally I prefer "Yes" to be the default button.
Uncomment | MB_DEFBUTTON2
if you think "No" should be default.
Thank you.
Copied from original issue: pnedev/comparePlus#2
From @Yaron10 on March 10, 2016 19:6
Replace
funcItem[CMD_COMPARE_LAST_SAVE]._pFunc = compareLocal;
lstrcpy(funcItem[CMD_COMPARE_LAST_SAVE]._itemName, TEXT("Compare to last save"));
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey = new ShortcutKey;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_isAlt = true;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_isCtrl = false;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_isShift = false;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_key = 'S';
funcItem[CMD_COMPARE_LAST_SAVE]._init2Check = false;
funcItem[CMD_COMPARE_SVN_BASE]._pFunc = compareSvnBase;
lstrcpy(funcItem[CMD_COMPARE_SVN_BASE]._itemName, TEXT("Compare against SVN base"));
funcItem[CMD_COMPARE_SVN_BASE]._pShKey = new ShortcutKey;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_isAlt = true;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_isCtrl = false;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_isShift = false;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_key = 'B';
funcItem[CMD_COMPARE_SVN_BASE]._init2Check = false;
funcItem[CMD_COMPARE_GIT_BASE]._pFunc = compareGitBase;
lstrcpy(funcItem[CMD_COMPARE_GIT_BASE]._itemName, TEXT("Compare against GIT base"));
funcItem[CMD_COMPARE_GIT_BASE]._pShKey = new ShortcutKey;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_isAlt = true;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_isCtrl = true;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_isShift = false;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_key = 'B';
funcItem[CMD_COMPARE_GIT_BASE]._init2Check = false;
funcItem[CMD_SEPARATOR_2]._pFunc = NULL;
lstrcpy(funcItem[CMD_SEPARATOR_2]._itemName, TEXT("------------"));
funcItem[CMD_SEPARATOR_2]._pShKey = NULL;
funcItem[CMD_ALIGN_MATCHES]._pFunc = alignMatches;
lstrcpy(funcItem[CMD_ALIGN_MATCHES]._itemName, TEXT("Align Matches"));
funcItem[CMD_ALIGN_MATCHES]._pShKey = NULL;
funcItem[CMD_ALIGN_MATCHES]._init2Check = false;
funcItem[CMD_IGNORE_SPACING]._pFunc = includeSpacing;
lstrcpy(funcItem[CMD_IGNORE_SPACING]._itemName, TEXT("Ignore Spacing"));
funcItem[CMD_IGNORE_SPACING]._pShKey = NULL;
funcItem[CMD_IGNORE_SPACING]._init2Check = false;
funcItem[CMD_DETECT_MOVES]._pFunc = detectMoves;
lstrcpy(funcItem[CMD_DETECT_MOVES]._itemName, TEXT("Detect Moves"));
funcItem[CMD_DETECT_MOVES]._pShKey = NULL;
funcItem[CMD_DETECT_MOVES]._init2Check = false;
funcItem[CMD_USE_NAV_BAR]._pFunc = ViewNavigationBar;
lstrcpy(funcItem[CMD_USE_NAV_BAR]._itemName, TEXT("Navigation bar"));
funcItem[CMD_USE_NAV_BAR]._pShKey = NULL;
funcItem[CMD_USE_NAV_BAR]._init2Check = false;
funcItem[CMD_SEPARATOR_3]._pFunc = NULL;
lstrcpy(funcItem[CMD_SEPARATOR_3]._itemName, TEXT("-----------"));
funcItem[CMD_SEPARATOR_3]._pShKey = NULL;
funcItem[CMD_PREV]._pFunc = Prev;
lstrcpy(funcItem[CMD_PREV]._itemName, TEXT("Previous"));
funcItem[CMD_PREV]._pShKey = new ShortcutKey;
funcItem[CMD_PREV]._pShKey->_isAlt = false;
funcItem[CMD_PREV]._pShKey->_isCtrl = true;
funcItem[CMD_PREV]._pShKey->_isShift = false;
funcItem[CMD_PREV]._pShKey->_key = VK_PRIOR;
funcItem[CMD_PREV]._init2Check = false;
funcItem[CMD_NEXT]._pFunc = Next;
lstrcpy(funcItem[CMD_NEXT]._itemName, TEXT("Next"));
funcItem[CMD_NEXT]._pShKey = new ShortcutKey;
funcItem[CMD_NEXT]._pShKey->_isAlt = false;
funcItem[CMD_NEXT]._pShKey->_isCtrl = true;
funcItem[CMD_NEXT]._pShKey->_isShift = false;
funcItem[CMD_NEXT]._pShKey->_key = VK_NEXT;
funcItem[CMD_NEXT]._init2Check = false;
funcItem[CMD_FIRST]._pFunc = First;
lstrcpy(funcItem[CMD_FIRST]._itemName, TEXT("First"));
funcItem[CMD_FIRST]._pShKey = new ShortcutKey;
funcItem[CMD_FIRST]._pShKey->_isAlt = false;
funcItem[CMD_FIRST]._pShKey->_isCtrl = true;
funcItem[CMD_FIRST]._pShKey->_isShift = true;
funcItem[CMD_FIRST]._pShKey->_key = VK_PRIOR;
funcItem[CMD_FIRST]._init2Check = false;
funcItem[CMD_LAST]._pFunc = Last;
lstrcpy(funcItem[CMD_LAST]._itemName, TEXT("Last"));
funcItem[CMD_LAST]._pShKey = new ShortcutKey;
funcItem[CMD_LAST]._pShKey->_isAlt = false;
funcItem[CMD_LAST]._pShKey->_isCtrl = true;
funcItem[CMD_LAST]._pShKey->_isShift = true;
funcItem[CMD_LAST]._pShKey->_key = VK_NEXT;
funcItem[CMD_LAST]._init2Check = false;
funcItem[CMD_SEPARATOR_4]._pFunc = NULL;
lstrcpy(funcItem[CMD_SEPARATOR_4]._itemName, TEXT("-----------"));
funcItem[CMD_SEPARATOR_4]._pShKey = NULL;
funcItem[CMD_OPTION]._pFunc = openOptionDlg;
lstrcpy(funcItem[CMD_OPTION]._itemName, TEXT("Option"));
funcItem[CMD_OPTION]._pShKey = NULL;
funcItem[CMD_OPTION]._init2Check = false;
with
funcItem[CMD_COMPARE_LAST_SAVE]._pFunc = compareLocal;
lstrcpy(funcItem[CMD_COMPARE_LAST_SAVE]._itemName, TEXT("Compare to last Save"));
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey = new ShortcutKey;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_isAlt = true;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_isCtrl = false;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_isShift = false;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_key = 'S';
funcItem[CMD_COMPARE_LAST_SAVE]._init2Check = false;
funcItem[CMD_COMPARE_SVN_BASE]._pFunc = compareSvnBase;
lstrcpy(funcItem[CMD_COMPARE_SVN_BASE]._itemName, TEXT("Compare to SVN base"));
funcItem[CMD_COMPARE_SVN_BASE]._pShKey = new ShortcutKey;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_isAlt = true;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_isCtrl = false;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_isShift = false;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_key = 'B';
funcItem[CMD_COMPARE_SVN_BASE]._init2Check = false;
funcItem[CMD_COMPARE_GIT_BASE]._pFunc = compareGitBase;
lstrcpy(funcItem[CMD_COMPARE_GIT_BASE]._itemName, TEXT("Compare to GIT base"));
funcItem[CMD_COMPARE_GIT_BASE]._pShKey = new ShortcutKey;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_isAlt = true;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_isCtrl = true;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_isShift = false;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_key = 'G'; // Yaron
funcItem[CMD_COMPARE_GIT_BASE]._init2Check = false;
funcItem[CMD_SEPARATOR_2]._pFunc = NULL;
lstrcpy(funcItem[CMD_SEPARATOR_2]._itemName, TEXT("------------"));
funcItem[CMD_SEPARATOR_2]._pShKey = NULL;
funcItem[CMD_ALIGN_MATCHES]._pFunc = alignMatches;
lstrcpy(funcItem[CMD_ALIGN_MATCHES]._itemName, TEXT("Align Matches"));
funcItem[CMD_ALIGN_MATCHES]._pShKey = NULL;
funcItem[CMD_ALIGN_MATCHES]._init2Check = false;
funcItem[CMD_IGNORE_SPACING]._pFunc = includeSpacing;
lstrcpy(funcItem[CMD_IGNORE_SPACING]._itemName, TEXT("Ignore Spacing"));
funcItem[CMD_IGNORE_SPACING]._pShKey = NULL;
funcItem[CMD_IGNORE_SPACING]._init2Check = false;
funcItem[CMD_DETECT_MOVES]._pFunc = detectMoves;
lstrcpy(funcItem[CMD_DETECT_MOVES]._itemName, TEXT("Detect Moves"));
funcItem[CMD_DETECT_MOVES]._pShKey = NULL;
funcItem[CMD_DETECT_MOVES]._init2Check = false;
funcItem[CMD_USE_NAV_BAR]._pFunc = ViewNavigationBar;
lstrcpy(funcItem[CMD_USE_NAV_BAR]._itemName, TEXT("Navigation Bar"));
funcItem[CMD_USE_NAV_BAR]._pShKey = NULL;
funcItem[CMD_USE_NAV_BAR]._init2Check = false;
funcItem[CMD_SEPARATOR_3]._pFunc = NULL;
lstrcpy(funcItem[CMD_SEPARATOR_3]._itemName, TEXT("-----------"));
funcItem[CMD_SEPARATOR_3]._pShKey = NULL;
funcItem[CMD_PREV]._pFunc = Prev;
lstrcpy(funcItem[CMD_PREV]._itemName, TEXT("Previous"));
funcItem[CMD_PREV]._pShKey = new ShortcutKey;
funcItem[CMD_PREV]._pShKey->_isAlt = true; // Yaron
funcItem[CMD_PREV]._pShKey->_isCtrl = false;
funcItem[CMD_PREV]._pShKey->_isShift = false;
funcItem[CMD_PREV]._pShKey->_key = VK_PRIOR;
funcItem[CMD_PREV]._init2Check = false;
funcItem[CMD_NEXT]._pFunc = Next;
lstrcpy(funcItem[CMD_NEXT]._itemName, TEXT("Next"));
funcItem[CMD_NEXT]._pShKey = new ShortcutKey;
funcItem[CMD_NEXT]._pShKey->_isAlt = true; // Yaron
funcItem[CMD_NEXT]._pShKey->_isCtrl = false;
funcItem[CMD_NEXT]._pShKey->_isShift = false;
funcItem[CMD_NEXT]._pShKey->_key = VK_NEXT;
funcItem[CMD_NEXT]._init2Check = false;
funcItem[CMD_FIRST]._pFunc = First;
lstrcpy(funcItem[CMD_FIRST]._itemName, TEXT("First"));
funcItem[CMD_FIRST]._pShKey = new ShortcutKey;
funcItem[CMD_FIRST]._pShKey->_isAlt = true; // Yaron
funcItem[CMD_FIRST]._pShKey->_isCtrl = true;
funcItem[CMD_FIRST]._pShKey->_isShift = false;
funcItem[CMD_FIRST]._pShKey->_key = VK_PRIOR;
funcItem[CMD_FIRST]._init2Check = false;
funcItem[CMD_LAST]._pFunc = Last;
lstrcpy(funcItem[CMD_LAST]._itemName, TEXT("Last"));
funcItem[CMD_LAST]._pShKey = new ShortcutKey;
funcItem[CMD_LAST]._pShKey->_isAlt = true; // Yaron
funcItem[CMD_LAST]._pShKey->_isCtrl = true;
funcItem[CMD_LAST]._pShKey->_isShift = false;
funcItem[CMD_LAST]._pShKey->_key = VK_NEXT;
funcItem[CMD_LAST]._init2Check = false;
funcItem[CMD_SEPARATOR_4]._pFunc = NULL;
lstrcpy(funcItem[CMD_SEPARATOR_4]._itemName, TEXT("-----------"));
funcItem[CMD_SEPARATOR_4]._pShKey = NULL;
funcItem[CMD_OPTION]._pFunc = openOptionDlg;
lstrcpy(funcItem[CMD_OPTION]._itemName, TEXT("Options")); // Yaron
funcItem[CMD_OPTION]._pShKey = NULL;
funcItem[CMD_OPTION]._init2Check = false;
Thank you.
Copied from original issue: pnedev/comparePlus#3
STR:
Result:
"nul" is added to the files.
Apparently, a comparison shouldn't happen at all when the 2 views contain the same file cloned.
From @Yaron10 on March 10, 2016 19:6
Replace
/* sync pannels */
HMENU hMenu = ::GetMenu(nppData._nppHandle);
syncScrollVwasChecked = (::GetMenuState(hMenu, IDM_VIEW_SYNSCROLLV, MF_BYCOMMAND) & MF_CHECKED) != 0;
syncScrollHwasChecked = (::GetMenuState(hMenu, IDM_VIEW_SYNSCROLLH, MF_BYCOMMAND) & MF_CHECKED) != 0;
if (syncScrollVwasChecked)
::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLV, 0), 0);
if (syncScrollHwasChecked)
::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLH, 0), 0);
// let the second view inherit the zoom level of the main view
int mainZoomLevel = SendMessage(nppData._scintillaMainHandle, SCI_GETZOOM, 0, 0);
SendMessage(nppData._scintillaSecondHandle, SCI_SETZOOM, mainZoomLevel, 0);
::SendMessageA(nppData._scintillaMainHandle, SCI_GOTOPOS, 1, 0);
::SendMessageA(nppData._scintillaSecondHandle, SCI_GOTOPOS, 1, 0);
::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLH, 0), 0);
::SendMessageA(nppData._scintillaMainHandle, SCI_SETUNDOCOLLECTION, FALSE, 0);
::SendMessageA(nppData._scintillaSecondHandle, SCI_SETUNDOCOLLECTION, FALSE, 0);
with
// Yaron - Change code location.
::SendMessageA(nppData._scintillaMainHandle, SCI_GOTOPOS, 0, 0); // Yaron - pos 0, 0. Why 1, 0?
::SendMessageA(nppData._scintillaSecondHandle, SCI_GOTOPOS, 0, 0);
//::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLV, 0), 0); // Yaron - Not nedded.
::SendMessageA(nppData._scintillaMainHandle, SCI_SETUNDOCOLLECTION, FALSE, 0);
::SendMessageA(nppData._scintillaSecondHandle, SCI_SETUNDOCOLLECTION, FALSE, 0);
/* sync pannels */
HMENU hMenu = ::GetMenu(nppData._nppHandle);
syncScrollVwasChecked = (::GetMenuState(hMenu, IDM_VIEW_SYNSCROLLV, MF_BYCOMMAND) & MF_CHECKED) != 0;
syncScrollHwasChecked = (::GetMenuState(hMenu, IDM_VIEW_SYNSCROLLH, MF_BYCOMMAND) & MF_CHECKED) != 0;
if (syncScrollVwasChecked) // Yaron - Disable vertical scroll sync. Use "case SCN_UPDATEUI:".
::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLV, 0), 0);
if (!syncScrollHwasChecked) // Yaron - Enable horizontal scroll sync.
::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLH, 0), 0);
// let the second view inherit the zoom level of the main view
int mainZoomLevel = SendMessage(nppData._scintillaMainHandle, SCI_GETZOOM, 0, 0);
SendMessage(nppData._scintillaSecondHandle, SCI_SETZOOM, mainZoomLevel, 0);
Why call
if (syncScrollHwasChecked)
::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLH, 0), 0);
and then again
::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLH, 0), 0);
? - Do it once.
NOTE: I've also changed SCI_GOTOPOS, 1, 0);
to SCI_GOTOPOS, 0, 0);
.
What do you think?
Thank you.
Copied from original issue: pnedev/comparePlus#5
I concentrated on slightly improving the Scroll Sync and Wrap management.
It works well, but the structure of the code is not very elegant. It was written as a proposed draft for UFO.
I'd highly appreciate it if you could review it.
(Compare the original compare.cpp and my modified file; I've added "// Yaron" to my changes and some (alas, too) short comments).
**
I wrote it about a year ago. If anyone takes it, I'll provide more info.
Issue by Yaron10
Thursday Mar 10, 2016 at 19:05 GMT
Originally opened as pnedev/comparePlus#2
Replace
if(!different)
{
::MessageBox(nppData._nppHandle, TEXT("Files Match"), TEXT("Results :"), MB_OK);
return true;
}
with
if (!different)
{
if (::MessageBox(nppData._nppHandle, TEXT("Files match.\n\nClose compared files?"), TEXT("Compare Plugin"), MB_YESNO | MB_ICONQUESTION/* | MB_DEFBUTTON2 */) == IDYES) // Yaron - An option to close compared files.
{
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_FILE_CLOSE, 0);
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_SWITCHTO_OTHER_VIEW, 0);
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_FILE_CLOSE, 0);
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_SWITCHTO_OTHER_VIEW, 0);
}
return true;
}
Personally I prefer "Yes" to be the default button.
Uncomment | MB_DEFBUTTON2
if you think "No" should be default.
Thank you.
STR:
Result:
Compare results are cleared.
When returning from a comparison in Notepad++ 6.9.2 with Compare plugin 1.5.6, I have to insert a newline at the top of the code to get syntax highlighting back.
STR:
Uncheck "Ignore Spacing" and compare the files in Test.zip.
Result:
The Plugin Manager throws an exception and Compare crashes.
Proposed fix:
Changing
#define VARRAY_INIT_SIZE 16
to
#define VARRAY_INIT_SIZE 5
(in varray.h) seems to solve the problem.
Plugin Manager gives the error It has not been possible to validate the integrity of 'ComparePlugin.dll' needed to install or update a plugin. Do you want to copy this file anyway (not recommended)?
If one proceeds anyway, the same error is also given for:
Issue by Yaron10
Thursday Mar 10, 2016 at 19:06 GMT
Originally opened as pnedev/comparePlus#3
Replace
funcItem[CMD_COMPARE_LAST_SAVE]._pFunc = compareLocal;
lstrcpy(funcItem[CMD_COMPARE_LAST_SAVE]._itemName, TEXT("Compare to last save"));
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey = new ShortcutKey;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_isAlt = true;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_isCtrl = false;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_isShift = false;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_key = 'S';
funcItem[CMD_COMPARE_LAST_SAVE]._init2Check = false;
funcItem[CMD_COMPARE_SVN_BASE]._pFunc = compareSvnBase;
lstrcpy(funcItem[CMD_COMPARE_SVN_BASE]._itemName, TEXT("Compare against SVN base"));
funcItem[CMD_COMPARE_SVN_BASE]._pShKey = new ShortcutKey;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_isAlt = true;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_isCtrl = false;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_isShift = false;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_key = 'B';
funcItem[CMD_COMPARE_SVN_BASE]._init2Check = false;
funcItem[CMD_COMPARE_GIT_BASE]._pFunc = compareGitBase;
lstrcpy(funcItem[CMD_COMPARE_GIT_BASE]._itemName, TEXT("Compare against GIT base"));
funcItem[CMD_COMPARE_GIT_BASE]._pShKey = new ShortcutKey;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_isAlt = true;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_isCtrl = true;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_isShift = false;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_key = 'B';
funcItem[CMD_COMPARE_GIT_BASE]._init2Check = false;
funcItem[CMD_SEPARATOR_2]._pFunc = NULL;
lstrcpy(funcItem[CMD_SEPARATOR_2]._itemName, TEXT("------------"));
funcItem[CMD_SEPARATOR_2]._pShKey = NULL;
funcItem[CMD_ALIGN_MATCHES]._pFunc = alignMatches;
lstrcpy(funcItem[CMD_ALIGN_MATCHES]._itemName, TEXT("Align Matches"));
funcItem[CMD_ALIGN_MATCHES]._pShKey = NULL;
funcItem[CMD_ALIGN_MATCHES]._init2Check = false;
funcItem[CMD_IGNORE_SPACING]._pFunc = includeSpacing;
lstrcpy(funcItem[CMD_IGNORE_SPACING]._itemName, TEXT("Ignore Spacing"));
funcItem[CMD_IGNORE_SPACING]._pShKey = NULL;
funcItem[CMD_IGNORE_SPACING]._init2Check = false;
funcItem[CMD_DETECT_MOVES]._pFunc = detectMoves;
lstrcpy(funcItem[CMD_DETECT_MOVES]._itemName, TEXT("Detect Moves"));
funcItem[CMD_DETECT_MOVES]._pShKey = NULL;
funcItem[CMD_DETECT_MOVES]._init2Check = false;
funcItem[CMD_USE_NAV_BAR]._pFunc = ViewNavigationBar;
lstrcpy(funcItem[CMD_USE_NAV_BAR]._itemName, TEXT("Navigation bar"));
funcItem[CMD_USE_NAV_BAR]._pShKey = NULL;
funcItem[CMD_USE_NAV_BAR]._init2Check = false;
funcItem[CMD_SEPARATOR_3]._pFunc = NULL;
lstrcpy(funcItem[CMD_SEPARATOR_3]._itemName, TEXT("-----------"));
funcItem[CMD_SEPARATOR_3]._pShKey = NULL;
funcItem[CMD_PREV]._pFunc = Prev;
lstrcpy(funcItem[CMD_PREV]._itemName, TEXT("Previous"));
funcItem[CMD_PREV]._pShKey = new ShortcutKey;
funcItem[CMD_PREV]._pShKey->_isAlt = false;
funcItem[CMD_PREV]._pShKey->_isCtrl = true;
funcItem[CMD_PREV]._pShKey->_isShift = false;
funcItem[CMD_PREV]._pShKey->_key = VK_PRIOR;
funcItem[CMD_PREV]._init2Check = false;
funcItem[CMD_NEXT]._pFunc = Next;
lstrcpy(funcItem[CMD_NEXT]._itemName, TEXT("Next"));
funcItem[CMD_NEXT]._pShKey = new ShortcutKey;
funcItem[CMD_NEXT]._pShKey->_isAlt = false;
funcItem[CMD_NEXT]._pShKey->_isCtrl = true;
funcItem[CMD_NEXT]._pShKey->_isShift = false;
funcItem[CMD_NEXT]._pShKey->_key = VK_NEXT;
funcItem[CMD_NEXT]._init2Check = false;
funcItem[CMD_FIRST]._pFunc = First;
lstrcpy(funcItem[CMD_FIRST]._itemName, TEXT("First"));
funcItem[CMD_FIRST]._pShKey = new ShortcutKey;
funcItem[CMD_FIRST]._pShKey->_isAlt = false;
funcItem[CMD_FIRST]._pShKey->_isCtrl = true;
funcItem[CMD_FIRST]._pShKey->_isShift = true;
funcItem[CMD_FIRST]._pShKey->_key = VK_PRIOR;
funcItem[CMD_FIRST]._init2Check = false;
funcItem[CMD_LAST]._pFunc = Last;
lstrcpy(funcItem[CMD_LAST]._itemName, TEXT("Last"));
funcItem[CMD_LAST]._pShKey = new ShortcutKey;
funcItem[CMD_LAST]._pShKey->_isAlt = false;
funcItem[CMD_LAST]._pShKey->_isCtrl = true;
funcItem[CMD_LAST]._pShKey->_isShift = true;
funcItem[CMD_LAST]._pShKey->_key = VK_NEXT;
funcItem[CMD_LAST]._init2Check = false;
funcItem[CMD_SEPARATOR_4]._pFunc = NULL;
lstrcpy(funcItem[CMD_SEPARATOR_4]._itemName, TEXT("-----------"));
funcItem[CMD_SEPARATOR_4]._pShKey = NULL;
funcItem[CMD_OPTION]._pFunc = openOptionDlg;
lstrcpy(funcItem[CMD_OPTION]._itemName, TEXT("Option"));
funcItem[CMD_OPTION]._pShKey = NULL;
funcItem[CMD_OPTION]._init2Check = false;
with
funcItem[CMD_COMPARE_LAST_SAVE]._pFunc = compareLocal;
lstrcpy(funcItem[CMD_COMPARE_LAST_SAVE]._itemName, TEXT("Compare to last Save"));
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey = new ShortcutKey;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_isAlt = true;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_isCtrl = false;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_isShift = false;
funcItem[CMD_COMPARE_LAST_SAVE]._pShKey->_key = 'S';
funcItem[CMD_COMPARE_LAST_SAVE]._init2Check = false;
funcItem[CMD_COMPARE_SVN_BASE]._pFunc = compareSvnBase;
lstrcpy(funcItem[CMD_COMPARE_SVN_BASE]._itemName, TEXT("Compare to SVN base"));
funcItem[CMD_COMPARE_SVN_BASE]._pShKey = new ShortcutKey;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_isAlt = true;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_isCtrl = false;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_isShift = false;
funcItem[CMD_COMPARE_SVN_BASE]._pShKey->_key = 'B';
funcItem[CMD_COMPARE_SVN_BASE]._init2Check = false;
funcItem[CMD_COMPARE_GIT_BASE]._pFunc = compareGitBase;
lstrcpy(funcItem[CMD_COMPARE_GIT_BASE]._itemName, TEXT("Compare to GIT base"));
funcItem[CMD_COMPARE_GIT_BASE]._pShKey = new ShortcutKey;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_isAlt = true;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_isCtrl = true;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_isShift = false;
funcItem[CMD_COMPARE_GIT_BASE]._pShKey->_key = 'G'; // Yaron
funcItem[CMD_COMPARE_GIT_BASE]._init2Check = false;
funcItem[CMD_SEPARATOR_2]._pFunc = NULL;
lstrcpy(funcItem[CMD_SEPARATOR_2]._itemName, TEXT("------------"));
funcItem[CMD_SEPARATOR_2]._pShKey = NULL;
funcItem[CMD_ALIGN_MATCHES]._pFunc = alignMatches;
lstrcpy(funcItem[CMD_ALIGN_MATCHES]._itemName, TEXT("Align Matches"));
funcItem[CMD_ALIGN_MATCHES]._pShKey = NULL;
funcItem[CMD_ALIGN_MATCHES]._init2Check = false;
funcItem[CMD_IGNORE_SPACING]._pFunc = includeSpacing;
lstrcpy(funcItem[CMD_IGNORE_SPACING]._itemName, TEXT("Ignore Spacing"));
funcItem[CMD_IGNORE_SPACING]._pShKey = NULL;
funcItem[CMD_IGNORE_SPACING]._init2Check = false;
funcItem[CMD_DETECT_MOVES]._pFunc = detectMoves;
lstrcpy(funcItem[CMD_DETECT_MOVES]._itemName, TEXT("Detect Moves"));
funcItem[CMD_DETECT_MOVES]._pShKey = NULL;
funcItem[CMD_DETECT_MOVES]._init2Check = false;
funcItem[CMD_USE_NAV_BAR]._pFunc = ViewNavigationBar;
lstrcpy(funcItem[CMD_USE_NAV_BAR]._itemName, TEXT("Navigation Bar"));
funcItem[CMD_USE_NAV_BAR]._pShKey = NULL;
funcItem[CMD_USE_NAV_BAR]._init2Check = false;
funcItem[CMD_SEPARATOR_3]._pFunc = NULL;
lstrcpy(funcItem[CMD_SEPARATOR_3]._itemName, TEXT("-----------"));
funcItem[CMD_SEPARATOR_3]._pShKey = NULL;
funcItem[CMD_PREV]._pFunc = Prev;
lstrcpy(funcItem[CMD_PREV]._itemName, TEXT("Previous"));
funcItem[CMD_PREV]._pShKey = new ShortcutKey;
funcItem[CMD_PREV]._pShKey->_isAlt = true; // Yaron
funcItem[CMD_PREV]._pShKey->_isCtrl = false;
funcItem[CMD_PREV]._pShKey->_isShift = false;
funcItem[CMD_PREV]._pShKey->_key = VK_PRIOR;
funcItem[CMD_PREV]._init2Check = false;
funcItem[CMD_NEXT]._pFunc = Next;
lstrcpy(funcItem[CMD_NEXT]._itemName, TEXT("Next"));
funcItem[CMD_NEXT]._pShKey = new ShortcutKey;
funcItem[CMD_NEXT]._pShKey->_isAlt = true; // Yaron
funcItem[CMD_NEXT]._pShKey->_isCtrl = false;
funcItem[CMD_NEXT]._pShKey->_isShift = false;
funcItem[CMD_NEXT]._pShKey->_key = VK_NEXT;
funcItem[CMD_NEXT]._init2Check = false;
funcItem[CMD_FIRST]._pFunc = First;
lstrcpy(funcItem[CMD_FIRST]._itemName, TEXT("First"));
funcItem[CMD_FIRST]._pShKey = new ShortcutKey;
funcItem[CMD_FIRST]._pShKey->_isAlt = true; // Yaron
funcItem[CMD_FIRST]._pShKey->_isCtrl = true;
funcItem[CMD_FIRST]._pShKey->_isShift = false;
funcItem[CMD_FIRST]._pShKey->_key = VK_PRIOR;
funcItem[CMD_FIRST]._init2Check = false;
funcItem[CMD_LAST]._pFunc = Last;
lstrcpy(funcItem[CMD_LAST]._itemName, TEXT("Last"));
funcItem[CMD_LAST]._pShKey = new ShortcutKey;
funcItem[CMD_LAST]._pShKey->_isAlt = true; // Yaron
funcItem[CMD_LAST]._pShKey->_isCtrl = true;
funcItem[CMD_LAST]._pShKey->_isShift = false;
funcItem[CMD_LAST]._pShKey->_key = VK_NEXT;
funcItem[CMD_LAST]._init2Check = false;
funcItem[CMD_SEPARATOR_4]._pFunc = NULL;
lstrcpy(funcItem[CMD_SEPARATOR_4]._itemName, TEXT("-----------"));
funcItem[CMD_SEPARATOR_4]._pShKey = NULL;
funcItem[CMD_OPTION]._pFunc = openOptionDlg;
lstrcpy(funcItem[CMD_OPTION]._itemName, TEXT("Options")); // Yaron
funcItem[CMD_OPTION]._pShKey = NULL;
funcItem[CMD_OPTION]._init2Check = false;
Thank you.
I'm using Notepad++ 6.9.2 on Windows 7 x64 with the latest CI build of the compare plugin, made from 2e55f81, see https://ci.appveyor.com/project/jsleroy/compare-plugin/build/job/28h8q8a1w5vg0w7n/artifacts.
Notepad++ I have split into 2 vertical panes. In the left pane file1.c and in the right pane file2.c. When I attempt to compare the two files (Plugins > Compare > Compare) Notepad++ will show an assertion failed error. This is 100% reproducible for me. Attached are the files:
Assertion failed - vector subscript out of range.zip
Prior to this I used a CI build from 99e0c6c and occasionally it would give me the same error when working on random comparisons, however I don't think I ever had a repro case.
Also... is this the canonical repo for the compare plugin? (ie am I reporting this in the right place). I see the @pnedev fork has a master that seems to be more active.
I realize that this is a super simple and mostly self-explanatory, but there is one thing that I cant find, regarding the symbolism (in the side column when doing a diff, the +- are obvious but what is the orange what looks like an equals sign with a line down the center of it?).
Maybe if someone was bored they could add single HTML page that describes the plugin, and put a link to it hosted somewhere in the about box in the plugin?
Hi, I am new here and only registered at github, because I like and use the compare plugin a lot and now getting some serious errors.
Unfortunately this plugin is unusable in its current state. I never had any problems with the previous versions and I liked to use it a lot for work and private purposes. Now it simply doesn't work anymore.
I can only scroll down, regardless of the mouse wheel direction. When I scoll it flickers heavily and both sides are not in sync. Additionally it shows black blocks and behaves randomly. Please see the attachment for an example. Thank you :)
Notepadd++ v5.9.5
Compare v2.0
From @Yaron10 on March 10, 2016 19:5
When comparing In One-View mode, the current file and the previous file should be compared.
Also, the current file should always get the top (or left) view.
NOTE:
This fix (current at top) does not address "Compare to last Save".
I've never used "Compare to Git".
Replace
if(!IsWindowVisible(nppData._scintillaMainHandle) || !IsWindowVisible(nppData._scintillaSecondHandle))
{
skipAutoReset = true;
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_GOTO_ANOTHER_VIEW, 0);
skipAutoReset = false;
panelsOpened = true;
}
with
if(!IsWindowVisible(nppData._scintillaMainHandle) || !IsWindowVisible(nppData._scintillaSecondHandle)) // Yaron - One-View mode.
{
skipAutoReset = true;
// Yaron - In One-View mode, the current view can be 0 or 1.
// In Two-Views mode, the top (or left) view is ALWAYS 0, and the bottom view is ALWAYS 1.
int currentView = SendMessage(nppData._nppHandle, NPPM_GETCURRENTVIEW, 0, 0);
LRESULT bufferID = SendMessage(nppData._nppHandle, NPPM_GETCURRENTBUFFERID, 0, 0);
// Yaron - If the current view is 0, we want the prev file to be moved to the bottom; if the current view is 1, we still need to activate it and make sure it's compared to the current file.
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_TAB_PREV, 0);
if(currentView == 1)
{
bufferID = SendMessage(nppData._nppHandle, NPPM_GETCURRENTBUFFERID, 0, 0);
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_TAB_NEXT, 0); // Yaron - Switch back to current file.
}
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_GOTO_ANOTHER_VIEW, 0); // Yaron - Current file is ALWAYS at top, and prev file is ALWAYS at bottom.
activateBufferID(bufferID, currentView); // Yaron - If the current view is 0, activate current file at top; if the current view is 1, activate prev file at bottom (possibly multiple files there).
if (currentView == 1)
SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_SWITCHTO_OTHER_VIEW, 0); // Yaron - Activate current file at top.
skipAutoReset = false;
panelsOpened = true;
}
and add the following function
void activateBufferID(LRESULT bufferID, int view)
{
LRESULT index = SendMessage(nppData._nppHandle, NPPM_GETPOSFROMBUFFERID, bufferID, view);
index = index & 0x3FFFFFFF;
SendMessage(nppData._nppHandle, NPPM_ACTIVATEDOC, view, index);
}
Thank you.
Copied from original issue: pnedev/comparePlus#1
Hello,
I have often a lot of tabs opened, so I enable the notepad++ option "Tab Bar / Multi-line" in the General preferences menu.
Since the tabs appears only on the left side, this create a shift between the left and the right side, making the diff harder to read. See the image bellow.
The right side should be shift as well as the left side to avoid this problematic.
Hello,
It is a great tool. But I am facing a problem with files containing more than 16384 lines (2^14). The screen gets black, I have to press Alt+F4 to close notepad++ to retrieve the desktop
Do you have a solution without splitting the file into many?
Best Regards,
A new extra Status Bar for Compare could be useful.
It should have the following segments:
Total diffs.
No. of added lines.
No. of removed lines.
No. of not equal lines.
No. of moved lines.
Various messages: "No files to compare.", "Can not locate Git." etc.
A small Progress Bar for comparing large files.
Pressing "Clear Results" should terminate the process and close the status bar.
Anyway, the incomplete Progress Bar introduced in v.1.5.6.7 should be removed (unless, of course, its development is continued).
Currently there seem to be at least two branches of the Compare plugin
There are multiple issues though:
I think it would be great if both branches could be merged, including
In this way I think popularity of the Compare plugin will greatly increase (right now it might seem to users that the plugin is unmaintained since the Bitbucket repository is not among the top hits of any search engine and the other repositories were not updated in a long time).
Also contributions can be channeled much more efficiently greatly benefiting the project.
Please let me know what you think of this suggestion. If you're willing to follow my suggestions I'd be happy to support you if you can use help with any of the steps.
BR,
Pavel
Issue by Yaron10
Thursday Mar 10, 2016 at 19:06 GMT
Originally opened as pnedev/comparePlus#5
Replace
/* sync pannels */
HMENU hMenu = ::GetMenu(nppData._nppHandle);
syncScrollVwasChecked = (::GetMenuState(hMenu, IDM_VIEW_SYNSCROLLV, MF_BYCOMMAND) & MF_CHECKED) != 0;
syncScrollHwasChecked = (::GetMenuState(hMenu, IDM_VIEW_SYNSCROLLH, MF_BYCOMMAND) & MF_CHECKED) != 0;
if (syncScrollVwasChecked)
::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLV, 0), 0);
if (syncScrollHwasChecked)
::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLH, 0), 0);
// let the second view inherit the zoom level of the main view
int mainZoomLevel = SendMessage(nppData._scintillaMainHandle, SCI_GETZOOM, 0, 0);
SendMessage(nppData._scintillaSecondHandle, SCI_SETZOOM, mainZoomLevel, 0);
::SendMessageA(nppData._scintillaMainHandle, SCI_GOTOPOS, 1, 0);
::SendMessageA(nppData._scintillaSecondHandle, SCI_GOTOPOS, 1, 0);
::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLH, 0), 0);
::SendMessageA(nppData._scintillaMainHandle, SCI_SETUNDOCOLLECTION, FALSE, 0);
::SendMessageA(nppData._scintillaSecondHandle, SCI_SETUNDOCOLLECTION, FALSE, 0);
with
// Yaron - Change code location.
::SendMessageA(nppData._scintillaMainHandle, SCI_GOTOPOS, 0, 0); // Yaron - pos 0, 0. Why 1, 0?
::SendMessageA(nppData._scintillaSecondHandle, SCI_GOTOPOS, 0, 0);
//::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLV, 0), 0); // Yaron - Not nedded.
::SendMessageA(nppData._scintillaMainHandle, SCI_SETUNDOCOLLECTION, FALSE, 0);
::SendMessageA(nppData._scintillaSecondHandle, SCI_SETUNDOCOLLECTION, FALSE, 0);
/* sync pannels */
HMENU hMenu = ::GetMenu(nppData._nppHandle);
syncScrollVwasChecked = (::GetMenuState(hMenu, IDM_VIEW_SYNSCROLLV, MF_BYCOMMAND) & MF_CHECKED) != 0;
syncScrollHwasChecked = (::GetMenuState(hMenu, IDM_VIEW_SYNSCROLLH, MF_BYCOMMAND) & MF_CHECKED) != 0;
if (syncScrollVwasChecked) // Yaron - Disable vertical scroll sync. Use "case SCN_UPDATEUI:".
::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLV, 0), 0);
if (!syncScrollHwasChecked) // Yaron - Enable horizontal scroll sync.
::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLH, 0), 0);
// let the second view inherit the zoom level of the main view
int mainZoomLevel = SendMessage(nppData._scintillaMainHandle, SCI_GETZOOM, 0, 0);
SendMessage(nppData._scintillaSecondHandle, SCI_SETZOOM, mainZoomLevel, 0);
Why call
if (syncScrollHwasChecked)
::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLH, 0), 0);
and then again
::SendMessage(nppData._nppHandle, WM_COMMAND, MAKELONG(IDM_VIEW_SYNSCROLLH, 0), 0);
? - Do it once.
NOTE: I've also changed SCI_GOTOPOS, 1, 0);
to SCI_GOTOPOS, 0, 0);
.
What do you think?
Thank you.
In the current development version of the compare plugin (I tested 129cfb9) the navigation bar was redesigned to be scrollable.
While this makes it a lot easier to locate the exact position of changes, it makes it impossible to quickly check (i.e. with one glance) where in the file changes were applied.
Personally I strongly prefer the previous behavior, where the navigation bar was only rescaled to fit the window height. This behavior should be brought back at least as an option.
Issue by Yaron10
Thursday Mar 10, 2016 at 20:57 GMT
Originally opened as pnedev/comparePlus#6
I've removed the three blocks starting with
::EnableMenuItem(hMenu, funcItem[CMD_PREV]._cmdID
Other commands are not enabled/disabled. Why those?
Thank you.
I'm getting the following error: "This plugin is not compatible with current version of notepad++." It might be result of changing from Notepad 6 to 7. What can I do to remedy this error? I have installed the dll in the correct plugin folder.
I've been using Notepad++ for an eternity and heavily relied on the Compare plugin for it to easily diff source code.
With the release of the Notepad++ version 7 in 64bit I naturally switched to that .. only to find out that the Compare plugin is not yet compatible.
Any chance to get a working 64bit binary build of the plugin soon-ish?
Issue by Yaron10
Friday Apr 08, 2016 at 06:38 GMT
Originally opened as pnedev/comparePlus#43
Hello Pavel,
Continued from pnedev/comparePlus#10 (comment).
If I understand "Select first" correctly, you want to give the user another option besides "Compare current to previous".
This can be very useful if you have multiple files open in Single-View mode. Great!
So why not implement it as "Compare current to last active" instead of "Select first" which is less intuitive and clear? (No offense please :) ).
Compare: Compare current to previous (Single-View) or Compare current to the active file in the other view.
Compare current to last active: should only be available in Single-View mode.
What do you think?
Anyway, I think you should add a Help item opening a window (a long message box) briefly describing the various options.
Thank you.
Best regards.
STR:
Result:
One file (while still open) is added to the Recent Files list.
A similar problem occurs in other cases as well.
Hello,
It would be great if an "Ignore Case" option could be added.
Hi guys,
I have a proposal about making the files to be compared more explicit.
Example of the current situation:
At this point it is not quite clear for me as a user which files will get compared. The currently viewed one and the next? The previous?
So my suggestion is the following:
Does it make sense, what do you think?
BR,
Pavel
From @Yaron10 on March 10, 2016 19:6
After the line
FlashWindowEx(&flashInfo);
add
MessageBeep(MB_OK); // Yaron - Sound notification.
Thank you.
Copied from original issue: pnedev/comparePlus#4
Issue by Yaron10
Thursday Mar 10, 2016 at 19:06 GMT
Originally opened as pnedev/comparePlus#4
After the line
FlashWindowEx(&flashInfo);
add
MessageBeep(MB_OK); // Yaron - Sound notification.
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.