Skip to content

Commit

Permalink
fix byte alignment issue in SCNotification struct
Browse files Browse the repository at this point in the history
if you were noticing that SCNotification.Updated
    was not being properly filled for SCN_UPDATEUI notifications,
    this is why.
  • Loading branch information
molsonkiko committed Mar 29, 2024
1 parent 74862af commit 7e8e03e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed

1. Fixed issue where clicking buttons on floating docking dialogs could sometimes cause Notepad++ to hang forever (see [CsvLint issue 83](https://github.com/BdR76/CSVLint/issues/83) for a detailed explanation).
2. Fix `SCNotification` byte alignment issue in 64-bit Notepad++ by making `annotationLinesAdded` field an `IntPtr`, which has been the correct type for that field since [between Notepad++ 7.6.6 and 7.7](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/37c4b894cc247d1ee6976bc1a1b66cfed4b7774e/scintilla/include/Scintilla.h#L1227). Note that *this is a potentially breaking change for 64-bit Notepad++ 7.6.6 or older*, but there's a ton of other bit rot for such old Notepad++ anyway.

## [0.0.3] - 2024-02-26

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public struct ScNotification
public int X; /* SCN_DWELLSTART, SCN_DWELLEND */
public int Y; /* SCN_DWELLSTART, SCN_DWELLEND */
public int Token; /* SCN_MODIFIED with SC_MOD_CONTAINER */
public int AnnotationLinesAdded; /* SC_MOD_CHANGEANNOTATION */
public IntPtr AnnotationLinesAdded; /* SC_MOD_CHANGEANNOTATION */
public int Updated; /* SCN_UPDATEUI */
public int ListCompletionMethod; /* SCN_AUTOCSELECTION, SCN_AUTOCCOMPLETED, SCN_USERLISTSELECTION */
public int CharacterSource; /* SCN_CHARADDED */
Expand Down
4 changes: 2 additions & 2 deletions NppCSharpPluginPack/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("0.0.3.2")]
[assembly: AssemblyFileVersion("0.0.3.2")]
[assembly: AssemblyVersion("0.0.3.3")]
[assembly: AssemblyFileVersion("0.0.3.3")]
6 changes: 3 additions & 3 deletions most recent errors.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Test results for CSharpPluginPack v0.0.3.1 on Notepad++ 8.6.4 64bit
Test results for CSharpPluginPack v0.0.3.3 on Notepad++ 8.6.4 64bit
NOTE: Ctrl-F (regular expressions *on*) for "Failed [1-9]\d*" to find all failed tests
No tests failed
=========================
Expand All @@ -21,8 +21,8 @@ Testing Performance of something
Performance tests for My benchmarks (test1)
=========================

To run query "foo" on file of size 7913 into took 0 +/- 0.001 ms over 32 trials
Query times (ms): 0.003, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
To run query "foo" on file of size 7913 into took 0 +/- 0 ms over 32 trials
Query times (ms): 0.002, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Preview of result: Preview of result
=========================
Performance tests for My benchmarks (test2)
Expand Down

0 comments on commit 7e8e03e

Please sign in to comment.