Make sure previous tab does not keep focus when switching tabs.
TO REPRODUCE:
Step 1: Move a tab using drag and drop.
Step 2: Use a tab switching hotkey/feature which doesn't set TCM_SETCURFOCUS AND TCM_SETCURSEL
Fixes#3545, closes#3552
Updated file "NppIO.cpp" to deal with issue #3553
However both existing and updated code looks same, but it is not.
command(IDM_VIEW_MONITORING);
looks equal to
buf->stopMonitoring();
checkMenuItem(IDM_VIEW_MONITORING, false);
_toolBar.setCheck(IDM_VIEW_MONITORING, false);
buf->setUserReadOnly(false);
Updated code works on the current file being processed while existing code command(IDM_VIEW_MONITORING); works with current active buffer. Debugging for reported case can help to understand the above statement.
Justification for updating file "NppCommands.cpp":
See static HANDLE hThread gets a handle when monitoring is activated on a tab.
This handle is overwritten if monitoring is activated on another tab. Resource leak happens here as previous handle can't be closed at all.
However, this handle is not used anywhere in the code, then just why not to close the handle as soon thread is created.
Closes#3554, fixes#3553
functionParser.h: add virtual destructor into abstract class.
A memory leak has been found by using PVS-Studio analyzer.
Analyzer warning: V599 The virtual destructor is not present, although the 'FunctionParser' class contains virtual functions.
Closes#3402
How to reproduce the bug:
If the current tab size is smaller then next tab, click on 'x' button to close current tab, then next tab replces the closed tab position. Without move cursor and click on the next tab (now it becomes current tab), clicked tab is closed.
Fixed:
This bug is due to the current tab's information is not updated between 2 clicks.
Update the current hover tab RECT (_currentHoverTabRect) and close hover flag (_isCloseHover), so that x will be highlighted or not based on new _currentHoverTabRect.
Fixes#3004, closes#3340
While D:\test.txt has been opend. And open new Tab (new 1), add random text then save
it as D:\test.txt - 2 different tabs having same file opened and they could have
different content.
The fix checks for opened file existence only in the other view
(either in sub view or in main view), but does not check in same view.
Fixes#3384, Closes#3500
Dropping folder into Notepad++ to have Folder as Workspace not make its
toolbar button activated. This bug is fixed by this commit.
Fixes#3282, closes#3501
Load plugin only when plugin name match to plugin folder name.
For example: "NppPluginDemo.dll" can be loaded only when it in the
folder named "NppPluginDemo".
The new installer argument /allowAppDataPluginsLoading add file
allowAppDataPlugins.xml which allows Notepad++ to load plugins
from "%APPDATA%\Notepad++\plugins\"
An issue has been found by using PVS-Studio analyzer.
Analyzer warning: V501 There are identical sub-expressions to the left
and to the right of the '!=' operator: subject != subject.
Closes#3399
A weakness has been found by using PVS-Studio analyzer.
Analyzer warnings:
* V595 The 'pScint' pointer was utilized before it was verified against
nullptr. Check lines: 347, 353. scintillaeditview.cpp 347
* V713 The pointer _langList[i] was utilized in the logical expression
before it was verified against nullptr in the same logical expression.
parameters.h 1286
closes#3400