Fix resizing dockable window (e.g. search result, function list, folder as workspace) and resizing the doc splitter (other view) one after the other issue.
Fix#5516, fix#680, fix#2097, close#5554
Using ^= for the readonly attribute will cause it to always change the bit. So if CLEARREADONLY is called on a file that isn't read only, the file will become read only.
Fix#5768, close#5774
The bug: Drag a short name tab to accross a longger name tab (w/o releasing mouse click) will make a swich - dragging the logger name instead of the shorter name one.
This regression is due to PR "Fix Tab non-responding after dragging bug".
This reverts commit c6e1a95098.
Fix#5072, fix#5450, open #4885
This is an workaround to deal with Microsoft issue in ReadDirectoryChanges notification
If command prompt is used to write file continuously (e.g. ping -t 8.8.8.8 > ping.log)
Then ReadDirectoryChanges does not detect the change.
The workarround is about using Notepad++ notification while Notepad++ getting focus.
Close#5773
How to reproduce:
1. Select a few lines, trigger "Hide lines".
2. Select a few other lines, trigger "Hide lines" as well.
3. Unhide the topmost block by clicking on the appropriate marker.
4. The marker to restore the other block disappear. So the block is still hidden, it cannot be unhidden and there is no more visual indication there are hidden lines!
Fix#1112, Close#5665
File manager uses its Scintilla view (with its default document) to save and load file so these 2 op won't be done on foreground.
The fix decreases the reference of document to save correctly while the failure of saving (out of disk space).
Close#5659
This commit makes a performance issue: Re-loading the same text file over and over results in huge memory taken up
This reverts commit 198cf90c16.
Fix#5595
Corsican translation has been updated to take the new strings into account. In addition, apostrophe signs, suspension points and quotation marks have been modified and unnecessary uppercases removed.
Close#5469
cfa702a8a8 (Retain read only flag state in session)
Crash can be reproduced by replacing the content by following code (replace YOUR_FULL_FILE_PATH by your existing full file path):
<NotepadPlus>
<Session activeView="1">
<mainView activeIndex="0" />
<subView activeIndex="0">
<File firstVisibleLine="128" xOffset="0" scrollWidth="8768" startPos="11571" endPos="11571" selMode="0" lang="Normal Text" encoding="-1" filename="YOUR_FULL_FILE_PATH" backupFilePath="" originalFileLastModifTimestamp="-1930112874" originalFileLastModifTimestampHigh="30727970" mapFirstVisibleDisplayLine="-1" mapFirstVisibleDocLine="-1" mapLastVisibleDocLine="-1" mapNbLine="-1" mapHigherPos="-1" mapWidth="-1" mapHeight="-1" mapKByteInDoc="177" mapWrapIndentMode="-1" mapIsWrap="no" />
</subView>
</Session>
</NotepadPlus>
There are several important regression in uchardet to 0.0.6. Hence this revert.
This reverts commit bfb7e863cc.
Fix#5299, fix#5310, fix#5202, fix#5440Close#5414
The current commit contain unstable behaviour and could lead to crash.
OTOH Update Scintilla component will get the same feature. So Scintilla will be updated in short term.
This reverts commit 455fcb2da4.
* Added Ctrl+Shift+D to select next occurence of selection
* Left and right movement works for multiple cursors
* Enter/return a new line works for multiple cursors
Close#5322, close#5399
Fix a long waiting issue about file auto change detection, by adding a new option to avoid an annoying behaviour:
If file content is changed outside of Notepad++, while focus back to Notepad++, the current editing tab will be switched off, the changed file will be switched to and user will be asked to reload the file in question.
The new option remains the editing tab. User will be asked to reload it only if the changed file is switched in.
Fix#1087, Fix#3349, Fix#3333, Fix#3528, Fix#3138, Fix#3934, Fix#3160, Fix#1822, Fix#745, Fix#3599, Fix#4329, Fix#3971, Fix#4592, Fix#1116, Fix#2082Close#4180, Close#5386, Close#4189, Close#1995, Close#2867, Close#3306, Close#2776, Close#2724, Close#2405, Close#4072, Close#4747Close#5389
- corrected xml encoding from UTF8 with BOM -> required UTF8 for zulu and kurdish
- added zulu to localization list, see also #5209
- space -> tab in localizationString.h according to the rest of the list
Close#5209, close#5397
Extend class StringDlg, so that characters which are not allowed in a file name such as |, :, >, < etc. will be restricted for tab's new name so that there will be no problem while saving backup file.
Close#5324
Fixed issue #3776 of splitter panes not being equal due to the widths not taking into account the size of the splitter. Also fixed a spelling error.
Fix#3776, close#5190
Restrict the usage of customized search engine on only "http://" or "https://" url schema to avoid whatever application can be launched via "Search on Internet" command.
New correct behaviour: Dragging out a "new #" document from instance 1 and dropping it into instance 2 makes disappear "new #" document from instance 1, and nothing happens in instance 2.
Several UDL xml files can be loaded to allow to manage/share UDL more easily.
1. The old file userDefineLang.xml is kept in its old location and is still used.
2. The new folder userDefineLangs is added beside of the old UDL default file. Any UDL xml file can go into the folder userDefineLangs and will be loaded as UDL.
3. A UDL xml file must contain one (or several) user defined language(s).
4. The created UDL via UDL dialog and imported UDL are saved in userDefineLang.xml (default UDL file).
https://notepad-plus-plus.org/community/topic/17072/new-enhancement-for-user-defined-language-system
Unexpect behaviour: if "<NppDir>\...dll" and/or "<NppDir>\plugins\..dll" exist, they will be loaded because Notepad++ try to load "<NppDir>\pluginName\pluginName.dll" as plugin, in our case "<NppDir>\plugins\..\...dll" and "<NppDir>\plugins\.\..dll" respectively.
The fix is excluding both directories ".." & "." to not load mentionned above unwanted dll.
Notepad++ launches updater (gup.exe) without checking the signature, that makes exe hacking possible.
The fix is to check updater binary's signature before launching it.
When the amount of clipboard data is too important, it makes crash of function WideCharToMultiByte (win32 API).
The remedy is to capture this error to prevent Notepad++ from crash.
Summary of the Issue:
A remote code execution (RCE) vulnerability was found when a user opens a crafted containing folder in the command line. Code execution is possible by injecting a & followed by system commands into the name of the folder.
Steps to reproduce:
Download the attached archive on Windows: unzip_me.zip (F404758)
Unzip it and navigate into it
Open the txt file inside with Notepad++
Go to File -> Open containing folder -> cmd
Impact statement:
Successful exploitation of this vulnerability would allow an attacker to remotely execute arbitrary commands on the victim's computer.
Inexistent path %APPDATA%\Notepad++\plugins\Config\ made some plugins crash.
In this PR the folder is checked (and created if it doesn't exist) by each launch of Notepad++.
Loading plugin list location is changed from %LOCALAPPDATA%\Notepad++\plugins\Config\ to
%PROGRAMDATA%\Notepad++\plugins\Config\
Enhance API NPPM_GETPLUGINSCONFIGDIR
Close#5037
User @buggalicious found the summary text is displaying a count of characters without line endings not blanks.
Patch should address #3849 by updating the text to describe what is actually being counted.
checked all files of the APIs dir for xml syntax issues and corrected the invalid files
Tested with plugin tools and checked also against https://www.xmlvalidation.com/
The current invalid xml syntax seems to have no bad influence on the functionality of the files.
Notepad++ loads plugins only from 2 locations:
1. %PROGRAMDATA%\Notepad++\plugins\ - while Notepad++ installed on: %PROGRAMFILES%\Notepad++\ or wherever without doLocalConf.xml
2. <NPP_INST_DIR>\plugins\ - while Notepad++ installed on wherever (except in %PROGRAMFILES%\Notepad++\) with doLocalConf.xml
- Fixed "Chinglish" Grammar (Original Chinese translator's defence: they are not "Chinglish", they are good Chinese translations which are not accepted by "normal people", who lakes the imagination and creactivity)
- Unified Translation for some terms
- `$STR_REPLACE` -> `$STR_REPLACE$`
- Added Several Translation
While plugins are in %PROGRAMDATA%, we need admin's rights to modify them. This PR detects the plugins installation in %PROGRAMDATA%, then launch wingup with UAC.
This PR contains three types of changes:
1. Actual bug fix. This bug appeared, because prior to closing files, "Close all but this" attempts to save modified files, and for that it needs to switch views. Those views were not restored after that, however - so further actions could end up being executed on a wrong view. Those are changed commented with // We may have to restore previous view after saving new files.
2. Another potential bug fix. Closing files in both views could result in views being switched (it may or may not, I did not manage to unambiguously find that out from the code). To prevent any possible issues, I stored view IDs in viewNo. If those could never switch, then the code changes nothing - but if they could, it fixes a potential bug.
3. Code clarity fix in Notepad_plus::switchEditViewTo. std::swap makes it more obvious this code is there only to swap values around!
Fixes#4911, Close#4920
Use the _isFolding flag to fix several overlooked edge case hangs.
This pull request fixes additional hangs I found after #4867 when working with deeply-nested fully-folded files. The hangs are easy to reproduce by following these steps:
Download the sample file https://raw.githubusercontent.com/notepad-plus-plus/notepad-plus-plus/master/PowerEditor/src/Parameters.cpp
Open the downloaded file by itself in NPP and fold it using Alt-0
Create a new empty tab and remain focused on it
Perform the six actions below, each of which will produce a hang as NPP tries to change focus back to the first tab. On my machine, each hang lasts about 30 seconds. After control returns, refocus the empty tab again and try the next action.
Use File>>Open to reopen the downloaded file, even though it is already open
Drag and drop the downloaded file onto NPP to reopen it
Double-click the downloaded file to reopen it
Right-click the downloaded file and select Edit with Notepad++ in the context menu
Open the downloaded file from the command line: C:\Program Files (x86)\Notepad++\notepad++.exe" .\Parameters.cpp
Click the red [X] in the upper right corner to close NPP
After applying the patch, none of the hangs should happen any more.
Close#4999
This PR fixes UTF-8 detection for 4 byte characters (a 2002 code used by npp assumed characters longer than 3 bytes are invalid -.-). This means such files will not be erroreously displayed as ANSI anymore.
Steps to reproduce:
Create a new UTF-8 file (w/out BOM)
Paste eg. this character 🍪 and save.
Reopen the file again.
Prior to this PR, file is detected as ANSI (even if Notepad++ is configured to default-assume UTF-8!!!). After this fix, file gets opened as UTF-8 correctly.
Fixes#4730, Fixes#3986, Fixes#3441, Fixes#3405, Closes#4922
The new message NPPM_GETPLUGINHOMEPATH allows plugins to get plugin home root path. It's useful if plugins want to get its own path by appending <pluginFolderName> which is the name of plugin without extension part.
Simply plugins loading emplacement:
NPPM_GETAPPDATAPLUGINSALLOWED to check to see if loading plugins from "%APPDATA%\..\Local\Notepad++\plugins" is allowed.
If doLocalConf no
else yes
1. Load plugins only from the new plugin folder structure. example: Notepad++\plugins\myAwesomePlugin\myAwesomePlugin.dll
2. Load plugins from only one directory. If doLocalConf.xml is present, then it will be <NPP_INSTALLATION_DIR>\plugins\
otherwise %USERPROFILE%\AppData\Local\Notepad++\plugins\
Old installation behaviour is loading installed plugins without restart Notepad++, which could make some plugins loading uncomplete.
New behaviour use the same implementation of plugin updating, witch quit notepad++ for plugin installation then restart Notepad++.
For the sake of retro-compatibility, change the way of plugin packaging:
1. The plugin DLL file should be placed at the root level of the ZIP file. It has to be the only DLL file on this level.
2. The root level of the ZIP file can also contain additional files and folders which will be copied to the users harddisk as well.
3. Everything what gets copied from the ZIP file will be stored under <Npp-installation-folder>\plugins\<plugin-name>.