NotepadPlusPlusPluginPack.Net
NotepadPlusPlusPluginPack.Net copied to clipboard
Add patch for NaN, Inf compiler errors, quality-of-life improvement in WhatIsNpp
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 like 1d / 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
from int
to IntPtr
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.