Commit Graph

317 Commits (63760073ef31584c656b6bfd8bfd11740aa9b0fc)

Author SHA1 Message Date
Don HO dbac42edd0
Use unary operator '!' instead of "not" 2021-02-20 04:44:34 +01:00
mere-human e7079d57c6
Enhance FileDialog for allowing UNIX stile file path
And use modern CustomFileDialog istead of old FileDialog in Notepad++.

In the file dialog, override window procedure for "OK" button and
file name edit box to check for input.
Transform forward slash file name to a Window path after input.

Fix #9374, close #9403
2021-01-26 18:52:15 +01:00
Don HO ab5c1d3e2a
Upgrade Notepad++ License
Update GPL version from v2 to v3.

Fix #9425, close #9441
2021-01-24 01:51:19 +01:00
Christian Grasser a55d46d170
Fix incompatible plugin not being deleted issue
Unload incompatible plugin before deleting it.

Fix #9377, close #9382
2021-01-11 04:58:15 +01:00
mere-human b58a5cc227
Use the mordern browse folder dialog to get folder path
Add new methods to CustomFileDialog:
- setTitle() sets the dialog title
- setFolder() sets an initial directory
- pickFolder() shows a file open dialog to select a folder

Use CustomFileDialog in folderBrowser().

Affected areas:
- Search > Find in Files
- File > Open Folder as Workspace
- Preferences > Default Directory
- Preferences > Backup > Custom Backup
- Preferences > Cloud & Link

Fix #8513, close #9378
2021-01-11 03:56:46 +01:00
Don HO c9c2d1e376
Add an option for displying constant line number width
1. Add an option for displying constant line number width in Preferences dialog.
   This option set the line number constant width according the total line number in the document (minimun 4 digits).
   It ensures no unexpected visual effect while scrolling content vertically.
   If the document content is modified and the total number of lines is increased or decreased, more digits will be added or removed according the number of digits in total number of lines.

2. Add new plugin messages NPPM_GETLINENUMBERWIDTHMODE & NPPM_SETLINENUMBERWIDTHMODE for getting or setting LINENUMWIDTH_DYNAMIC / LINENUMWIDTH_CONSTANT.
   So plugins may send NPPM_SETLINENUMBERWIDTHMODE message with LINENUMWIDTH_CONSTANT to Notepad++ for avoiding some unexpected visual effect (while scrolling).

Fix #5670
2020-12-06 16:38:53 +01:00
Scott Sumner b2387286b1
Fix find in files failure issue due to directory path with leading/trailing spaces
Trim spaces on Directory for FindInFiles to fix such issue.

Fix #9199, close #9208
2020-11-29 14:29:16 +01:00
Don HO 7874f8dab3
Add new API NPPM_GETSETTINGSONCLOUDPATH for plugins
#define NPPM_GETSETTINGSONCLOUDPATH (NPPMSG + 98)
	// INT NPPM_GETSETTINGSCLOUDPATH(size_t strLen, TCHAR *settingsOnCloudPath)
	// Get settings on cloud path. It's useful if plugins want to store its settings on Cloud, if this path is set.
	// Returns the number of TCHAR copied/to copy. If the return value is 0, then this path is not set, or the "strLen" is not enough to copy the path.
	// Users should call it with settingsCloudPath be NULL to get the required number of TCHAR (not including the terminating nul character),
	// allocate settingsCloudPath buffer with the return value + 1, then call it again to get the path.

Close #9168
2020-11-19 04:29:50 +01:00
Scott Sumner 91e3594836 Remove some unused files from project
Close #9075
2020-10-29 19:13:22 +01:00
Scott Sumner 7bcb34b848 Add some missing items to Visual Studio project
Fix #9063, close #9073
2020-10-29 14:51:13 +01:00
Scott Sumner 77d4606967
Add ability to remove any duplicate lines in a document, keeping the first occurrence
Fix #8965, close #9033
2020-10-23 16:04:34 +02:00
Pavel Nedev a103151774
Fix NUL file-corruption bug after Windows shutdown brutally
Bypass Windows caching when flushing files after write.

According Microsoft documentation this fixes the issues with saved file corruption (all NULs)
on sudden power loss or restart.

Microsoft documentation for reference:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/fopen-wfopen?view=vs-2019
https://docs.microsoft.com/en-us/cpp/c-runtime-library/stream-i-o?view=vs-2019

Fix #6133, close #8952
2020-10-06 15:55:41 +02:00
Scott Sumner 61bf9bd3c4
Add case insensitive lines sorting
Close #4479, close #8869
2020-09-28 23:29:33 +02:00
Scott Sumner b072479bb8 Fix column key sort with col block starting in col1 bug
Fix #8716, close #8717
2020-08-18 18:31:27 +02:00
Scott Sumner 5271b88fc3 Fix sorting by column key using incorrect key values
Fix #8674, close #8675
2020-08-09 13:44:25 +02:00
Scott Sumner ca3d514722 Add ability to sort lines randomly
Close #8682, close #8683
2020-08-09 04:19:08 +02:00
Scott Sumner 9f29015a71
Allow user to skip *.* when adding only excluding Filters for Find/Replace In Files
Close #8169, close #8255
2020-05-15 01:27:11 +02:00
Waldi Ravens 6b51bb464a
Fix incorrect macro name
Close #8246
2020-05-11 04:54:57 +02:00
Don HO cc2c9b7740
Implement multi-line edge feature
Close #3128
2020-04-13 04:15:32 +02:00
Don HO 3de506bf48
Update copyright
Close #5919
2020-04-04 23:03:18 +02:00
Don HO 6e6341cc61
Make some codes conform to the defined coding style 2020-01-28 02:20:44 +01:00
Waldi Ravens 0db5b6d3d8 Fix HashFromDlg title bar localization issue
Fix #7884, close #7885
2020-01-27 10:36:07 +01:00
Don HO b0c5de10f9
Fix API comment error
Fix #7717
2019-12-28 18:56:43 +05:00
Don HO 14074e1487
Disable file association settings when Notepad++'s no admin right
File association feature under Windows 10 needs the Administrator's preivilege.
This commit add an explicit message to users who want to use this feature, and disable this feature if Notepad++ has no Administrator's preivilege.

Fix #4984, fix #5192, fix #4542
2019-12-27 00:35:16 +05:00
Don HO b3419ad00d
Fix a typo 2019-12-04 01:32:24 +01:00
Don HO f44c357999
Add tooltip for filter usage in Find in Files dialog 2019-11-22 14:28:13 +01:00
Ale dc48cee5f7
Add find in files filter excluding ability
Filter usage example:
*.* !*.exe !*.obj !*.log

Close #7618, close #7626
2019-11-21 13:34:01 +01:00
Don HO ebe0b1b189
Use "#pragma once" instead of "#ifndef" 2019-11-16 03:38:11 +01:00
Markus Heidelberg 98f4b1503e
Fix GCC compile errors under Linux due to case sensitivity in #include
Closse #7528
2019-11-13 01:46:05 +01:00
Christian Grasser c741f83bde
Update makefile for mingw gcc builds
Close #4145
2019-11-07 22:13:47 +01:00
Don HO 5cf296ee10
Remove Author from About and add Online Document to menu
Remove Author link from About dialog and add Online Document link to menu
2019-10-05 17:07:39 +02:00
Don HO 581aff630a
Use standard C++11 mutex
And remove unecessary files

Close #6093
2019-08-25 23:34:30 +02:00
Don HO ab46fe0806
Code enhancement: remove duplicated code 2019-08-22 01:19:22 +02:00
luisffranca 0d87d37d35
Handle Ctrl+A keyboard shortcut in MD5/SHA256 Generators
Added new window procedures for the HASH_PATH_EDIT/HASH_RESULT_EDIT
and HASH_TEXT_EDIT/HASH_RESULT_FOMTEXT_EDIT controls, where Ctrl+A
is now processed.

Fix #3863, close #3898, close #6034, close #6059
2019-08-22 00:50:13 +02:00
Don HO 93a9962fde
Code enhancement: Use C++11 =default & =delete for the constructor & destructor 2019-08-19 02:05:21 +02:00
Rajendra Singh 3a1244177c
Code enhancement: Function arguments pass by reference
Close #6063
2019-08-18 01:16:23 +02:00
Nikita Kolotov 0bf3eea08a
Code enhancement: add std qualificator
Fixed build failure caused by use of function std::make_pair without qualificator.

Fix #6051, close #6052
2019-08-17 10:24:58 +02:00
Don HO 77da706207
Code enhancement: remove goto label
Close #6053, close #6054
2019-08-16 12:34:39 +02:00
Don HO 06db9ee338
Code improvement for NppParameters 2019-08-14 22:13:24 +02:00
Don HO bbc55d06f2
Code improvement for WcharMbcsConvertor 2019-08-14 01:54:56 +02:00
Rajendra Singh 938dae9b2a
Improve singleton
Close #6036
2019-08-13 12:48:05 +02:00
Don HO 3643a1875b
Make 2 singleton "new-less"
Make WcharMbcsConvertor & FileManager "new-less"
2019-08-11 01:17:53 +02:00
AngryGamer 8b151ac991
Fix Sort Line as Integer regression
The regression was made by #5555:
ff20c264df

Close #5843, fix #5839
2019-07-06 02:51:01 +02:00
Silent 401dbbc7d5
Disable integrity checks in Debug
Close #5884
2019-07-05 01:36:07 +02:00
Waldi Ravens 31ae813286
Allow plugins to load private DLL files from the plugins folder
The problem is the way Windows searches for dynamically linked DLLs (Dynamic-Link Library Search Order).
For example, LuaScript.dll is the plug-in DLL, loaded by Notepad++.exe, and lua53.dll is the auxiliary DLL, required by LuaScript.dll and also by user-installed Lua modules. Both DLLs should be located in \plugins\LuaScript. But, when Notepad++ calls LoadLibrary to load LuaScript.dll, Windows will not find the dynamically linked lua53.dll, hence the LoadLibrary call fails. This happens, because Windows will look in the application directory (which is the location of Notepad++.exe), and not in the LuaScript.dll directory.
To make Windows search in the LuaScript.dll directory, Notepad++ needs to call LoadLibraryEx with the LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR flag.

Close #5802, close #5853
2019-07-04 20:29:05 +02:00
AngryGamer 6c034985a2
Fix crash when sorting out_of_range columns
Fix crash while sorting the right part of equal sign with column-selection:

100/20 = 5

1/3    = 0.333

22/7   = 3.14285714286

Note that empty lines between the numbers are intentional.

Fix #5865, fix #3391, close #3771
2019-07-04 01:39:52 +02:00
Don HO 57a49c3ba5
Add the commandline argument to open folders in "folder as workspace" panel
Add the ability to open folders in "folder as workspace" panel via command line argument "-openFoldersAsWorkspace".
Example:
notepad++ -openFoldersAsWorkspace c:\src\myProj01 c:\src\myProj02
The above command will launch notepad++ with folder as workspace panel by opening myProj01 and myProj02 in panel.

Close #4253, close #5100
2019-06-25 13:50:41 +02:00
AngryGamer 895c315df0
Fix drag and drop tab regression
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
2019-06-15 11:37:06 +02:00
Rajendra Singh ff20c264df
Fix crash while sorting lines with numbers longer than 20 digits
Fix #5261, close #5555
2019-05-30 17:26:22 +02:00
Don HO 01d8349b1f
Security: switch from component sha256 checking to certificate checking. 2019-05-10 09:35:25 +02:00