Fix crash issue while playing back macro if "find previous" and/or "find next"
button actions are/is recorded.
Also prevent from future crash if new commands in Find dialog are forgotten to be
treated.
in the same time issue
Fix Unicode file name comparision to match Windows behaviour (as opposed to doing a linguistic filename comparision)
Fixes#3820, closes#4141
The pair of button "Find Previous" and "Find Next" have been removed in
the previous version due to some regressions. It's restored with being optional.
Extracted parts of FileManager::reloadBuffer and FileManager::loadFile
to a separate function, so that both exhibit the same feature level of
EOL/encoding detection. reloadBuffer() used to have less logic than loadFile() and incorrectly handled UTF-8 detection when the file was ANSI
Fixes#2637, fixes#2843, closes#4124
The Access Violation while closing Notepad++:
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/3961
could be due to SCN_UPDATEUI sending after NPPN_SHUTDOWN, that makes
plugins treat SCN_UPDATEUI on the released handle.
To avoid such situation, once NPPN_SHUTDOWN has been sent, no more
message will be sent to plugin.
Fixes#3961, fixes#4021
V762 It is possible a virtual function was overridden incorrectly. See third argument of function 'create' in derived class 'UserDefineDialog' and base class 'StaticDialog'. userdefinedialog.h 332
V762 It is possible a virtual function was overridden incorrectly. See first argument of function 'redraw' in derived class 'SplitterContainer' and base class 'Window'. splittercontainer.h 61
V762 It is possible a virtual function was overridden incorrectly. See third argument of function 'create' in derived class 'FindReplaceDlg' and base class 'StaticDialog'. findreplacedlg.h 245
V762 It is possible a virtual function was overridden incorrectly. See third argument of function 'create' in derived class 'GoToLineDlg' and base class 'StaticDialog'. gotolinedlg.h 45
V762 It is possible a virtual function was overridden incorrectly. See third argument of function 'create' in derived class 'FindCharsInRangeDlg' and base class 'StaticDialog'. findcharsinrange.h 52
V762 It is possible a virtual function was overridden incorrectly. See third argument of function 'create' in derived class 'ColumnEditorDlg' and base class 'StaticDialog'. columneditor.h 45
V762 It is possible a virtual function was overridden incorrectly. See third argument of function 'create' in derived class 'WordStyleDlg' and base class 'StaticDialog'. wordstyledlg.h 77
V762 It is possible a virtual function was overridden incorrectly. See first argument of function 'redraw' in derived class 'WordStyleDlg' and base class 'Window'. wordstyledlg.h 99
V762 It is possible a virtual function was overridden incorrectly. See third argument of function 'create' in derived class 'PluginsAdminDlg' and base class 'StaticDialog'. pluginsadmin.h 100
V746 Object slicing. An exception should be caught by reference rather than by value. filedialog.cpp 183
V746 Object slicing. An exception should be caught by reference rather than by value. nppbigswitch.cpp 110
V746 Object slicing. An exception should be caught by reference rather than by value. pluginsmanager.cpp 259
Support interface and trait in PHP.
Support space between function name and opening parenthesis in PHP and JavaScript. Fixes at least #1919 and #2604.
About the JavaScript regex:
Current:
function(\s+[A-Za-z_]?\w*\([^\)\(]*\)|\([^\)\(]*\))
There are 2 parts, for named and anonymous functions. Note there is some duplication, let's simplify it:
function(\s+[A-Za-z_]?\w*)?\([^\)\(]*\)
The first character of function name is not optional (of course when the function is named), let's fix it:
function(\s+[A-Za-z_]\w*)?\([^\)\(]*\)
Finally let's support the possible spaces before opening parenthesis, for both named and anonymous functions:
function(\s+[A-Za-z_]\w*)?\s*\([^\)\(]*\)
Fixes#1919, fixes#2604, fixes#1667, fixes#2962closes#2523, closes#2621
Shorcut mapper - main panel : new colums that show the category of the shortcut
Shorcut mapper - plugin panel : new colums that show the plugin name that the shortcut belongs to
Shorcut mapper - scintilla panel : it shows every shortcuts configured for one command
Fixes#3583, Closes#3635
Due to 2 find buttons logic limit (lost replacing up capacity), the
direction option is added back, and 1 find button is restored (instead
of 2 find buttons).
"-quickPrint" allows user to launch Notepad++ via command to print a
given document then quit Notepad++ immediately.
Usage:
notepad++.exe -quickPrint c:\funcListTests\EncodingMapper.cpp
"notepad++.exe -export=functionList -lcpp c:\funcListTests\whatever.cpp"
will open whatever.cpp as cpp file, then parse this file to write the
funcLst result on disk, then exit Notepad++.
The result will write into c:\funcListTests\whatever.cpp.result.
Work with the arguments in a temporary array of pointers to the command
line before assigning them to paramVector as generic_string.
Follow up to afb3889. Since then the arguments were copied to
paramVector as generic_string too early, before the command line parsing
finished.
Closes https://github.com/notepad-plus-plus/notepad-plus-plus/pull/3575
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".
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
It seems REBARBANDINFO.cbSize initialization logic got broken after
migration to VS 2013 (last working version - 6.6.9)
That leads to various problems related to toolbar logic (like missing
chevron - #3385 or incorrect plugin toolbar placement #3094)
Closes#3386, fixes#3385, fixes#3094
A popuped message appear for the 1st modification from outside of
Notepad++, if users ignore it and save another change outside, the 2nd
popuped message appears. This commit fix this bad behaviour, which could
lead crash.
Closes#3307
Original code was flawed:
* On +S+H (hidden and system) files, the attributes are set 4 times,
when there's only need for 2 calls.
* When clearing +S bit, it is masked out from the _original_
attribute value, which means that if the +H was cleared previously,
it is set back again. It doesn't seem like this was intended, so
I assume it's a bug.
* When restoring the attributes, there's a pointless OR operation.
Close#2881
winmain: move local functions to anonymous namespace
winmain: remove redundant static keyword
winmain: add newline at the end of file
winmain: move UAC related code to anonymous function
winmain: declare MSGFLT_ADD/MSGFLT_ALLOW only if not already defined
winmain: check only for emptiness
parameters: move winKeyDefs & scintKeyDefs & PGNSI to anonymous names
parameters: remove redundant static/inline keywords
misc: remove unused source code
Closes#3030
Improve behavior when notifying the user about a buffer change (opened file changed or deleted)
- Restore the Notepad++ window and switch to the document in question *before* showing the dialog (this was only done afterwards before)
- Fix flickering issue described in #1018 and #2010 which was exposed by f2cd779066Closes#2956