Commit Graph

490 Commits

Author SHA1 Message Date
METANEOCORTEX\Kotti
a82163b1c2 fix: enhance existing homebrew AHK lexer 2026-05-14 11:00:06 +02:00
Rainer Kottenhoff
c2e627bcaa fix: small optimization of PCRE2 regEx backward search 2026-05-12 14:59:54 +02:00
Rainer Kottenhoff
20a5612291 upd: Scintilla v5.6.2 2026-05-03 12:13:07 +02:00
METANEOCORTEX\Kotti
3ccbb7f9e7 upd: Scintilla Lib v5.6.1 2026-04-16 01:40:18 +02:00
Pairi Daiza
29e6b42613
MUI - Migration to original grepWin Portable, update divers scripts and cleanup 2026-04-11 00:46:30 +02:00
Pairi Daiza
b9c78d8344
Revert "fix: try to fix flickering issue" 2026-04-06 23:46:00 +02:00
METANEOCORTEX\Kotti
4339223594 Fix ARM64 flickering/rendering issues on Windows 11 25H2
Addresses reported flickering and rendering problems on ARM64 devices
running Windows 11 25H2 by implementing ARM64-specific rendering
defaults, build configuration fixes, and redraw optimizations.

Rendering fixes:
- Default to SC_TECHNOLOGY_DIRECTWRITERETAIN on ARM64 to preserve
  back buffer between frames, avoiding blank flashes with Qualcomm
  Adreno GPUs and Win11 25H2 DWM compositor changes
- Wrap MsgThemeChanged() in WM_SETREDRAW FALSE/TRUE to suppress
  N intermediate repaints during heavy theme/DPI transitions
- Add WS_EX_COMPOSITED to main window on ARM64 for system-level
  double-buffering
- Remove RDW_ERASE from DarkMode ListView/TreeView RedrawWindow()
  calls to avoid background erase flash during theme changes

Build configuration fixes:
- Add _WIN64 preprocessor define to Scintilla, SciLexer, Lexilla
  ARM64 configurations (was missing, could cause 32-bit code paths)
- Add TargetMachine=MachineARM64 to all ARM64 linker sections across
  Notepad3, Scintilla, SciLexer, Lexilla projects
- Add CETCompat=false to Scintilla and SciLexer ARM64 configurations
  (CET is x86/x64 only, not compatible with ARM64)

Platform code improvements:
- Add _M_ARM64 detection for GrepWin binary selection (ARM64 was
  silently mapped to x64 binary via _WIN64 check)
- Add NP3_BUILD_ARM64 helper macro in TypeDefs.h for future
  ARM64-specific code paths
- Document RenderingTechnology setting in Build/Notepad3.ini with
  per-resolution override syntax and ARM64 troubleshooting tips

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-06 17:19:34 +02:00
METANEOCORTEX\Kotti
bdc51d5eda VS version update 2026-03-22 13:45:59 +01:00
Rainer Kottenhoff
aad3c16227 feat: add UCHARDET encoding prober filter (Settings2:UchardetLanguageFilter)
default(31): probe all encodings, 27: exclude Japanese prober...
2026-03-10 18:03:08 +01:00
METANEOCORTEX\Kotti
c330a935be chore: sync. with current scintilla mirror 2026-03-10 00:11:32 +01:00
METANEOCORTEX\Kotti
d68991a8fe fix: bug in Scintilla's Document::ConvertLineEnds() method 2026-03-09 22:38:20 +01:00
Rainer Kottenhoff
0f718805d4 fix: PCRE2 interface - bug matching line-end ($) 2026-03-06 16:15:03 +01:00
Rainer Kottenhoff
bc97ba45b1 refactor: remove deprecated Win7 compatibility, refactor background worker and file observation, UTF-32 detection 2026-03-05 15:55:07 +01:00
Rainer Kottenhoff
7a3b06d56d refactor: replace regex engines: Oniguruma (retired) by PCRE2 v10.47 2026-03-02 19:26:36 +01:00
METANEOCORTEX\Kotti
3044daf9e2 fix: update to Scintilla v5.6.0 2026-02-26 06:48:12 +01:00
METANEOCORTEX\Kotti
399b95a5b1 fix: Zooming 2026-02-20 16:58:02 +01:00
Pairi Daiza
faae0674bf
MUI - Migration of the MS VS2022 compiler to MS VS2026 2026-02-14 18:22:12 +01:00
METANEOCORTEX\Kotti
abce008f0a upd: prepare for VS 2026 vc145 platform toolset 2026-02-14 02:27:26 +01:00
METANEOCORTEX\Kotti
84385e28a9 upd: Lexilla v5.4.6, Scintilla v5.5.8 2026-02-14 01:13:14 +01:00
Derick Payne
20c2d857b1 Add ARM64 configuration support and build scripts
- Add ARM64 configurations to all project files (vcxproj)
- Add build scripts (Build_ARM64.cmd, Build_x64.cmd, etc.)
- Add ARM64 fix scripts for OutDir, CrossCompile, and CETCompat issues
- Update Notepad3.sln with ARM64 platform configurations
2026-01-19 02:12:15 +02:00
Pairi Daiza
619a27d887
MUI - minor changes and remove not needed .isl languages files 2026-01-18 19:11:54 +01:00
Derick Payne
3689e0a281 chore: reorganize font patches in np3_patches directory
- Moved font_resolution files to np3_patches root
- Added 002_fontweight_fontstyle_enums.md documentation
- Added 002a_fontweight_enum.patch and 002b_fontstyle_enum.patch
2026-01-18 02:58:27 +02:00
Derick Payne
9abb155c85 feat(scintilla): add FontStyle enum for Oblique font support
Adds FontStyle enum matching DWRITE_FONT_STYLE values:
- Normal (0)
- Oblique (1)
- Italic (2)

This provides explicit API support for oblique fonts like 'Iosevka Oblique'.
2026-01-18 02:55:02 +02:00
Derick Payne
3a26c0fd67 feat(scintilla): extend FontWeight enum with all DirectWrite values
Adds full range of font weights to support all DirectWrite variants:
- Thin (100), ExtraLight (200), Light (300), SemiLight (350)
- Normal (400), Medium (500)
- SemiBold (600), Bold (700), ExtraBold (800), Black (900), ExtraBlack (950)
2026-01-18 02:44:54 +02:00
Derick Payne
caaa9a4f03 chore: add patch file for DirectWrite font resolution fix 2026-01-18 02:41:55 +02:00
Derick Payne
c16da880d7 fix(scintilla): resolve DirectWrite font face names correctly
Adds ResolveFontFace() function to properly resolve font face names like
'Cascadia Mono Light' or 'Iosevka Oblique' into DirectWrite family name
plus weight/style/stretch parameters.

Uses IDWriteGdiInterop::CreateFontFromLOGFONT() to correctly resolve
font parameters that would otherwise cause DirectWrite to fail silently.

Fixes: #4150 (Iosevka variable fonts)
Fixes: #5410 (Global Default Font not applying)
Fixes: #5455 (Cascadia Mono Light rendering)

Based on Scintilla Bug #2080 and MR #36 discussion.
2026-01-18 02:39:50 +02:00
Derick Payne
f2bfef672d chore(scintilla): apply remaining 5.5.8 change to SetSelectionFromSerialized
Changed InvalidateStyleRedraw() to Redraw() in SetSelectionFromSerialized
to match Scintilla 5.5.8 upstream.

Note: ListBox.cxx was already at 5.5.8 parity (opaque colors, ItemHeight bitmap).
2026-01-18 02:21:30 +02:00
Derick Payne
87ca61243e chore(scintilla): cherry-pick Scintilla 5.5.8 bug fixes to 5.5.7 baseline
Applied selective changes from Scintilla 5.5.8 while preserving NP3 patches:

Bug fixes applied:
- Editor.cxx: Undo selection redraw fix (Bug #2487)
- Editor.cxx: Rectangular selection indent fix (Feature #1567)
- EditView.cxx: Bidi data bounds check
- CellBuffer.cxx: is_convertible_v type check

Features applied:
- CharacterCategoryMap.cxx: Unicode 16 character tables
- CaseConvert.cxx: Unicode 16 case folding
- Selection.cxx/h: New serialization format
- RunStyles.cxx: PTRDIFF_DOESNT_ALIAS_INT option
- CallTip.cxx: Removed macOS-specific colors

Intentionally excluded:
- PositionCache.cxx/h: noexcept conflicts with NP3
- win32/ScintillaWin.cxx: NP3 DPI exports preserved
- win32/PlatWin.cxx: 4-param AdjustWindowRectForDpi preserved

Removed 23 legacy upgrade_*.patch files, replaced with
np3_patches/upstream_558/ documentation.

Build verified: Release x64 successful
2026-01-18 02:19:22 +02:00
Derick Payne
f8a2fa22a8 docs: Add 22 upgrade patches for Scintilla 5.5.8 transition
Created patches comparing NP3 implementation vs official 5.5.8:
- include/: 2 patches (Scintilla.h, ScintillaTypes.h)
- src/: 16 patches (Editor.cxx largest at 247 lines)
- win32/: 4 patches (ScintillaWin.cxx largest at 380 lines)

All 21 files with NON STD SCI PATCH markers now documented.
Upgrade procedure: copy 5.5.8, apply patches, preserve oniguruma.
2026-01-18 01:11:37 +02:00
Derick Payne
d26d327762 docs: Complete Scintilla np3_patches with 11 patches vs official 5.5.7
Generated patches by comparing NP3 Scintilla against official 5.5.7 release:
- 001: Scintilla.h exports (DLL, DPI, IME, Strikethrough)
- 002: ScintillaTypes.h DotMatchAll
- 003: Sci_Position.h cstdint guard
- 004: ILoader.h C++ guard
- 005: Platform.h AlphaBlend
- 006: PlatWin.h 4-param signature
- 007: PlatWin.cxx 4-param implementation
- 008: ScintillaWin.cxx exports (largest: 15KB)
- 009: ListBox.cxx 4-param caller
- 010: ScintillaDLL.cxx entry
- 011: SurfaceD2D.cxx mods
2026-01-18 01:01:25 +02:00
Derick Payne
e210c7c699 docs: Add missing ListBox.cxx patch (006) to Scintilla np3_patches 2026-01-18 00:57:42 +02:00
Derick Payne
8214c0c04b revert: Undo partial Scintilla 5.5.8 upgrade (incompatible src/win32)
The partial upgrade approach failed - Scintilla 5.5.8 src/ files have
tight coupling with win32/ that cannot be separated due to changes in
PLATFORM_ASSERT and other shared macros. Scintilla stays at 5.5.7.

Lexilla 5.4.6 upgrade remains intact.
2026-01-18 00:52:54 +02:00
Derick Payne
5d0518377d deps: Upgrade Scintilla 5.5.7 to 5.5.8 (partial, DPI-safe)
- Upgraded all src/ files (30 files): CharacterCategoryMap, CaseConvert, CallTip, AutoComplete, Indicator, RunStyles, CellBuffer, CharClassify, Style, Document, Editor, EditView, EditModel, MarginView, ViewStyle, Platform.h, ScintillaBase, PositionCache, SplitVector.h, Partitioning.h
- Upgraded include/ files: ILoader.h, Sci_Position.h, Scintilla.iface, ScintillaCall.h, ScintillaMessages.h
- Upgraded win32/SurfaceD2D.cxx
- Preserved include/Scintilla.h (NP3 DLL exports)
- Preserved include/ScintillaTypes.h (DotMatchAll)
- Preserved win32/PlatWin.h/cxx (4-param AdjustWindowRectForDpi)
- Preserved win32/ScintillaWin.cxx (NP3 exports)
- Preserved win32/ListBox.cxx (DPI compatibility)
- Updated version.txt to 558
2026-01-18 00:47:48 +02:00
Derick Payne
ee0a51946f docs: Add Scintilla np3_patches with 5 patch files for future upgrades 2026-01-18 00:35:54 +02:00
Derick Payne
94170de0f2 revert: Restore Scintilla 5.5.7 and Lexilla 5.4.5 baseline
Reverts the broken Scintilla 5.5.8 / Lexilla 5.4.6 upgrade from
commit 2e4889e82 which was inadvertently pulled during rebase.
This restores the last known working state before incremental
upgrade attempt.
2026-01-18 00:29:47 +02:00
Derick Payne
c869371213 docs: Add np3_patches folder with Scintilla.h patch archive
- Created scintilla/np3_patches/ for tracking NP3 customizations
- Added README.md with patch registry and upgrade instructions
- Added 001_scintilla_h_np3_exports.patch (all Scintilla.h mods)
- Added orig/Scintilla.h.558.orig for clean upstream reference
- Updated scintilla-lexilla-upgrade.md with patch management strategy
2026-01-17 22:31:12 +02:00
Derick Payne
2e4889e82a deps: Upgrade Scintilla 5.5.8, Lexilla 5.4.6
- Updated Scintilla from 5.5.7 to 5.5.8
- Updated Lexilla from 5.4.5 to 5.4.6
- Preserved NP3 customizations (oniguruma regex, lexers_x, Scintilla.h patches)
- Documented all Scintilla.h NP3 patches in research doc
- Added _upgrade_backup to .gitignore
- Updated Changes.txt with upgrade entry
2026-01-17 22:10:57 +02:00
METANEOCORTEX\Kotti
0589ea292a update Scintilla, fix issue IME zoom 2025-07-12 13:34:38 +02:00
Pairi Daiza
603c3ee23e
MUI - Commit before release build "Notepad3 6.25.711.1 beta" 2025-07-11 15:55:26 +02:00
METANEOCORTEX\Kotti
adc6827fd1 +upd: Scintilla v.5.5.7 2025-06-12 02:50:39 +02:00
METANEOCORTEX\Kotti
e35fe62b0f +upd: Oniguruma v6.9.10 2025-06-12 01:13:30 +02:00
Rainer Kottenhoff
c94222ef00
Merge pull request #5392 from tabudz/CVE-2019-9023
Fix: Potential Vulnerability in Cloned Function
2025-06-12 00:00:46 +02:00
Emmanuel Ferdman
37a4566767
Resolve regex library warnings
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2025-05-28 04:13:30 -07:00
tabudz
55489ea323 Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node) 2025-02-28 22:29:03 +08:00
METANEOCORTEX\Kotti
4c1add22c0 +upd: Scintilla v5.5.4 2025-02-02 13:06:07 +01:00
LIU Hao
c3f2ec8fb6
Recover cursor state when editor window loses focus
The show count [1] of the mouse cursor, controlled by `ShowCursor()`, is
thread-local and has an effect only when the cursor is above a window of the
same thread. On the other hand, `GetCursorInfo()` reports the asynchronous
state of the cursor, which may be outside the editor window and doesn't
reflect the show count of our thread.

So, it is incorrect to manipulate the show count according to the result of
`GetCursorInfo()`. This commit reverts relevant changes about `cursorIsHidden`
in upstream Scintilla.

When the editor window loses focus but the cursor is not above it, the system
does not send a `WM_MOUSELEAVE` notification. So we also have to recover the
cursor state in `WM_KILLFOCUS`.

This closes https://github.com/rizonesoft/Notepad3/issues/5369

[1] https://devblogs.microsoft.com/oldnewthing/20091217-00/?p=15643

Signed-off-by: LIU Hao <lh_mouse@126.com>
2025-01-23 11:09:15 +08:00
METANEOCORTEX\Kotti
6a7500bc36 +upd: Scintilla Lib v5.5.3 2024-11-30 12:12:50 +01:00
METANEOCORTEX\Kotti
a2acd0d4fd +upd: Lexilla Library v5.4.0 (switch to Lexilla new TOML Lexer) 2024-08-24 12:23:10 +02:00
METANEOCORTEX\Kotti
89b75999c8 +add: Scintilla Libray v5.5.2 2024-08-24 09:51:07 +02:00
METANEOCORTEX\Kotti
c1d00ab579 +chg: menu Edit / Lines and Edit / Selection / Sort... : "remove duplicate lines" => "unite duplicate lines", "white-space" => "blank" , move order, 2024-07-03 01:56:45 +02:00