This repository has been archived by the owner on Jan 13, 2024. It is now read-only.
Add patch for NaN, Inf compiler errors, quality-of-life improvement in WhatIsNpp #94
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As noted in issue #93, some dependency in the project causes compiler errors if the compiler sees
double.Infinity
,double.NegativeInfinity
,double.NaN
, or anything else like1d / 0d
that can be compiled to one of those via static analysis.The NanInf class would solve that simply by safely creating those at runtime. I added a menu command with information on these errors and how to use the class. It's a crude and inelegant solution, but it works.
I also replaced insertCurrentPath with getCurrentPath, so you can get the current absolute file path as a string. I used this to periodically check the active file in whatIsNpp so that changing the active file stops the printing of text.
I changed the argument type for
NotepadPPGateway.GetFilePath
fromint
toIntPtr
to ensure that it can handle the 64-bit buffer ID's made by 64-bit Notepad++, and also added a new plugin command,Show files closed this session
, to illustrate how this method can be used to register the name of a file when it's closed (since the user might close a file other than the currently open file).I flagged IScintillaGateway.SetLexerLanguage as not working and indicated that people should use INotepadPPGateway.SetCurrentLanguage instead.
Nothing groundbreaking, but I think it's probably good to have.