-
Notifications
You must be signed in to change notification settings - Fork 7
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
add dark mode support, warnings for big dirs #45
add dark mode support, warnings for big dirs #45
Conversation
molsonkiko
commented
Jun 6, 2023
- All forms will now be colored to match the Notepad++ theme. This is true in dark mode and also with non-dark-mode themes that the user might use (e.g., Vim Dark Blue, Blackboard). However, the background of the DataGridView containing the filename rows is bugged in a very weird way. Hopefully someone can figure that out.
- Added a system for checking if the current directory is very large and could potentially cause tremendously long latency when the user has chosen recursive subdirectory search. Now a warning will pop up if there are more than 5000 files in the current directory tree, so that the user can choose to search only the top directory, or not to search that dir at all.
1. All forms will now be colored to match the Notepad++ theme. This is true in dark mode and also with non-dark-mode themes that the user might use (e.g., Vim Dark Blue, Blackboard). However, the background of the DataGridView containing the filename rows is bugged in a very weird way. Hopefully someone can figure that out. 2. Added a system for checking if the current directory is very large and could potentially cause tremendously long latency when the user has chosen recursive subdirectory search. Now a warning will pop up if there are more than 5000 files in the current directory tree, so that the user can choose to search only the top directory, or not to search that dir at all.
@molsonkiko I get error after typing: Stack trace: See the end of this message for details on invoking
|
Oh no! I'm sorry I messed up. That's really weird. I've tried pretty much everything I can think of to replicate that bug on my machine and I can't.
|
@molsonkiko It crashes only if search in top directory is enabled |
? DirectorySearchLevel.RecurseSubdirs | ||
: DirectorySearchLevel.None; | ||
filesInCurrentDirectory = SearchCurrentDirectory(searchLevel, nextTimeToRefresh, currentDirectory); | ||
searchLevel = subDirSearchAllowances[currentDirectory]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@molsonkiko It crashes here with top dir search enabled and sub dir disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@molsonkiko It looks like some caching of refresh and dictionary key mismatch.
Good catch! Yeah, I'm working on it. Should have fix ready by 7pm (US- Los
Angeles time)
…On Thu, Jun 8, 2023, 5:38 AM Oleksii Maryshchenko ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In NppNavigateTo/Forms/FrmNavigateTo.cs
<#45 (comment)>
:
> +
+ void FilterCurrentDirectory(Func<string, bool> filterFunc)
+ {
+ string currentDirectory = notepad.GetCurrentFileDirectory();
+ if (string.IsNullOrWhiteSpace(currentDirectory))
+ return;
+ bool userWantsSearchSubdirs = FrmSettings.Settings.GetBoolSetting(Settings.searchInSubDirs);
+ long nextTimeToRefresh = lastDirectoryReloadTimeTicks +
+ 10_000_000 * FrmSettings.Settings.GetIntSetting(Settings.secondsBetweenDirectoryScans); // 10 million ticks/sec
+ DirectorySearchLevel searchLevel = subDirSearchAllowances.TryGetValue(currentDirectory, out var oldAllowSearch)
+ ? oldAllowSearch
+ : userWantsSearchSubdirs
+ ? DirectorySearchLevel.RecurseSubdirs
+ : DirectorySearchLevel.None;
+ filesInCurrentDirectory = SearchCurrentDirectory(searchLevel, nextTimeToRefresh, currentDirectory);
+ searchLevel = subDirSearchAllowances[currentDirectory];
@molsonkiko <https://github.com/molsonkiko> It looks like some caching of
refresh and dictionary key mismatch.
—
Reply to this email directly, view it on GitHub
<#45 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALAQAIYZTQVZUD2MRAOCTA3XKHBVPANCNFSM6AAAAAAY32STHQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|