-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Path Completion not working regression #11147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I went on a version search to where this feature last worked. |
Hmm... It seems very little users use this feature - I searched issue tracker before opening a new one, but I found nothing. |
Testing autocompletion and path completion is one of tests. I repeatly get these 3 msgboxes using the menu entry
and then Notepad++ exits. With Ctrl+Alt+Space I get
Click OK and crashs Notepad++. Strange the different behaviours of menu item to keys. Probably irrelevent if fixed. Added some Output:
So added more characters to get position to 3000 in the document and tried again. Path completion works. const auto startPos = max(0, currentPos - bufSize); If I change
const auto startPos = max(0, currentPos - bufSize); with const long long int startPos = (currentPos >= bufSize) ? (currentPos - bufSize) : 0; works ok as it avoids directly comparing 4 byte int type with 8 byte int type. |
@mpheath |
Thanks for the information. This test works good as comparisons are only with #include <iostream> // std::cout
#include <algorithm> // std::max
#include <shlwapi.h> // MAX_PATH
int main () {
const intptr_t bufSize = MAX_PATH;
const intptr_t currentPos = 41;
const intptr_t zero = 0;
const auto startPos = std::max(zero, currentPos - bufSize);
std::cout << startPos << '\n';
} In const auto startPos = max(0, currentPos - bufSize); to const auto startPos = (currentPos > bufSize) ? (currentPos - bufSize) : 0; or const intptr_t startPos = (currentPos > bufSize) ? (currentPos - bufSize) : 0; or const intptr_t zero = 0;
const auto startPos = max(zero, currentPos - bufSize); works for me. If you can trust the compiler, then I changed the ternary |
Uh oh!
There was an error while loading. Please reload this page.
Description of the Issue
Path Completion has stopped working seems for quite moment.
It's a regression but it's not due to the removal 2GB restriction.
Steps to Reproduce the Issue
C:\
Edit > Auto-Completion > Path Completion
or hitCtrl-Alt-Space
Expected Behavior
Auto-completion list appears. All the sub-folder of C drive should be in the list.
Actual Behavior
Nothing happens.
Debug Information
Notepad++ v8.3 (64-bit)
Build time : Feb 5 2022 - 19:07:43
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 11 (64-bit)
OS Version : 2009
OS Build : 22000.434
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll
The text was updated successfully, but these errors were encountered: