Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
bc2ab67
fix(scintilla): include string explicitly for modern MSVC
itlezy Nov 9, 2026
c2ecf9b
build: migrate local builds to Visual Studio 2022
itlezy Nov 9, 2026
aebc91a
chore(scintilla): update to 3.7.6 preserving fork patches
itlezy Nov 9, 2026
2de3a79
chore: establish granular commits and Git editor policy
itlezy Nov 9, 2026
1551358
chore: keep fork-owned vendor project files consistent
itlezy Nov 9, 2026
6402487
style: normalize first-party text line endings only
itlezy Nov 9, 2026
def0fe8
docs: track fork reviews and focus native dark theme roadmap
itlezy Nov 9, 2026
e76635f
docs: establish minimal Notepad2-mod product direction
itlezy Nov 9, 2026
8c7f04f
docs: restrict theme scope to the editor
itlezy Nov 9, 2026
509a743
feat: add native Original and Dark editor palettes
itlezy Nov 9, 2026
863b19e
fix: preserve theme defaults and verify palette round trips
itlezy Nov 9, 2026
cdedc14
fix: reset active theme colors and test customization dialogs
itlezy Nov 9, 2026
4b3a555
docs: describe editor palettes and validation results
itlezy Nov 9, 2026
75ee2ce
build: package portable releases with source metadata
itlezy Nov 9, 2026
7aece29
ci: build test and publish versioned portable releases
itlezy Nov 9, 2026
470bcd8
docs: document CI artifacts and tag-driven releases
itlezy Nov 9, 2026
00a9958
fix(ci): handle PowerShell test success without a native exit code
itlezy Nov 9, 2026
f776ae6
fix(release): keep CLI wrapper distinct from gh executable
itlezy Nov 9, 2026
0de089f
test: wait for native customization controls before editing
itlezy Nov 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = crlf
insert_final_newline = true
trim_trailing_whitespace = false

# Preserve legacy source encodings; only these known formats default to UTF-8.
[*.{md,ps1,sh,yml,yaml}]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true

[*.ps1]
indent_size = 4

[*.{vcxproj,filters,props}]
charset = utf-8

[{.editorconfig,.gitattributes,.gitignore}]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true

[.githooks/*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true

[{src/Notepad2.rc,Notepad2.ini,distrib/Notepad2.ini}]
charset = utf-16le

# Do not rewrite vendor formatting, encodings or line endings.
[scintilla/**]
charset = unset
indent_style = tab
indent_size = tab
tab_width = 4
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset

[scintilla/*.{vcxproj,filters}]
indent_style = space
indent_size = 2
end_of_line = crlf

[scintilla/README.notepad2-mod.txt]
charset = utf-8
indent_style = space
indent_size = 2
44 changes: 43 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,43 @@
*.sh eol=lf
# Git stores declared text as LF; checkout endings ignore global defaults.
* text=auto
*.c text eol=crlf
*.cpp text eol=crlf
*.h text eol=crlf
*.bat text eol=crlf
*.sln text eol=crlf
*.vcxproj text eol=crlf
*.filters text eol=crlf
*.props text eol=crlf
*.md text eol=lf
*.ps1 text eol=lf
*.sh text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
.editorconfig text eol=lf
.gitattributes text eol=lf
.gitignore text eol=lf
.githooks/* text eol=lf

# Preserve legacy encodings and UTF-16 BOMs; never normalize these as UTF-8.
*.rc -text
*.ini -text
*.txt -text
*.ver -text
*.iss -text
*.js -text
*.conf -text
*.ico binary
*.bmp binary
*.cur binary
*.png binary
*.exe binary
*.dll binary
*.lib binary
*.pdb binary
*.zip binary

# Vendor bytes, including line endings, stay upstream-compatible.
/scintilla/** -text !eol
# These build files belong to the fork, rather than the upstream source archive.
/scintilla/*.vcxproj text eol=crlf
/scintilla/*.filters text eol=crlf
9 changes: 9 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
if command -v pwsh >/dev/null 2>&1; then
exec pwsh -NoProfile -File build/check-staged.ps1
elif command -v powershell.exe >/dev/null 2>&1; then
exec powershell.exe -NoProfile -ExecutionPolicy Bypass -File build/check-staged.ps1
else
echo "PowerShell is required to run build/check-staged.ps1." >&2
exit 1
fi
92 changes: 92 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Build and release
on:
push:
branches: ['**']
tags: ['v*']
pull_request:
permissions:
contents: read
concurrency:
group: build-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') }}
defaults:
run:
shell: pwsh
jobs:
build:
name: ${{ matrix.configuration }} ${{ matrix.architecture }}
runs-on: windows-2022
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
configuration: [Release, Debug]
architecture: [x86, x64]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Build
run: |
New-Item -ItemType Directory -Path bin -Force | Out-Null
./build/build.ps1 -Architecture '${{ matrix.architecture }}' -Configuration '${{ matrix.configuration }}' *> bin/build.log
if ($LASTEXITCODE -ne 0) { Get-Content bin/build.log -Tail 80; exit 1 }
- name: Test editor themes
run: |
try {
./build/test-themes.ps1 -Executable './bin/VS2022/${{ matrix.configuration }}_${{ matrix.architecture }}/Notepad2.exe' *> bin/tests.log
} catch {
Get-Content bin/tests.log -Tail 80
throw
}
Get-Content bin/tests.log
- name: Package portable release
if: matrix.configuration == 'Release'
env:
RELEASE_TAG: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || '' }}
run: ./build/package.ps1 -Architecture '${{ matrix.architecture }}' -Tag $env:RELEASE_TAG
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
if: success()
with:
name: executable-${{ matrix.configuration }}-${{ matrix.architecture }}
path: bin/VS2022/${{ matrix.configuration }}_${{ matrix.architecture }}/Notepad2.exe
if-no-files-found: error
retention-days: 14
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
if: success() && matrix.configuration == 'Release'
with:
name: release-package-${{ matrix.architecture }}
path: bin/packages/*.zip
if-no-files-found: error
retention-days: 14
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
if: always()
with:
name: logs-${{ matrix.configuration }}-${{ matrix.architecture }}
path: bin/*.log
retention-days: 14
release:
name: Publish release
needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'itlezy/notepad2-mod'
runs-on: windows-2022
timeout-minutes: 10
permissions:
contents: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: release-package-*
merge-multiple: true
path: bin/packages
- name: Verify and publish
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
RELEASE_TAG: ${{ github.ref_name }}
run: ./build/publish-release.ps1 -Tag $env:RELEASE_TAG -PackageDirectory bin/packages
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@
/res/Notepad2.exe.manifest
/signinfo.txt
/src/VersionRev.h
/.vs/
/.vscode/
/.idea/
*.log
*.pfx
*.p12
/.env
/.env.*
34 changes: 34 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Repository working rules

- Product direction: stay as close to Notepad2-mod as practical. Preserve its
fast startup, responsive editing, small footprint, native UI, and simple deployment.
Evolve through minimal, focused patches; do not rebase onto Notepad3/Notepad4
or adopt their feature stacks or theme frameworks.
- Prefer the existing native style/configuration model. Each dependency bump,
abstraction, background task, or feature expansion needs a concrete benefit
that justifies its maintenance and performance cost. Latest-version parity
is not a goal. Keep Scintilla at 3.7.6 unless a specific need is established.
- For runtime changes, assess startup, editing responsiveness, memory, and idle
work where affected. Compare against the current fork; never assume a patch
is faster or claim a regression without measurements.
- Theme scope is the editor only: text, syntax colors, margins, caret, selections,
folding and highlights. Application chrome (menus, dialogs, toolbar, status bar,
title bar and scrollbars) is out of scope, not a planned follow-up.
- Finish each logical change with a granular commit after relevant validation.
Do not ask again whether to commit completed, authorized work. Stage explicit
paths/hunks and inspect the staged diff. Keep dependency updates, build changes,
policy changes, formatting, and features in separate commits.
- Use a short-lived branch. Do not rewrite published commits or force-push shared
branches. Publishing, merging, or changing hosting settings requires authorization.
- Run `build/check-staged.ps1` before each commit. Use the build instructions in
Readme.md for code changes; report checks that were not run. Do not add tests
that merely repeat implementation details or repeat expensive checks without cause.
- Follow .editorconfig and .gitattributes. Preserve legacy encodings and UTF-16 BOMs.
Do not bulk-format source or normalize vendor files. Isolate any intended
first-party line-ending normalization from semantic changes.
- Keep Scintilla changes minimal. Preserve the customizations documented in
scintilla/README.notepad2-mod.txt and record the upstream version/source.
- Never stage generated output, private configuration, credentials, or signing
material. Keep origin pointing to itlezy/notepad2-mod and upstream to
XhmikosR/notepad2-mod. Change Git settings locally, never globally.
- Follow CONTRIBUTING.md for validation, local Git setup, and the Git/editor policy.
46 changes: 43 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ The original upstream is archived; this fork owns its ongoing maintenance.

## Keep changes focused

Preserve the Notepad2-mod experience: fast startup, responsive editing, a small
footprint, native controls, and simple deployment. Prefer a small patch to the
existing code over a new framework or subsystem. Notepad3/Notepad4 are not migration
targets or feature-stack templates for this fork. Dependency updates require a
specific benefit rather than version parity.

For runtime changes, describe the expected maintenance and performance impact.
Measure startup, memory, editing latency, or idle work when the change affects
them, using the current fork as the baseline. Report measurements and limitations;
do not assume small code changes are automatically cheap at runtime.

* Use a short-lived branch for each fix or feature and open a pull request against `master`.
* Prefer small, reviewable changes. Discuss broad refactors, dependency upgrades,
and compatibility changes before combining them with feature work.
Expand All @@ -15,15 +26,15 @@ The original upstream is archived; this fork owns its ongoing maintenance.

## Validate changes

Follow the inherited build instructions in [Readme.md](Readme.md). For application
Follow the build instructions in [Readme.md](Readme.md). For application
changes, build Release for Win32 and x64 and smoke-test the affected behavior.
Include reproduction steps, validation results, and any unavailable checks in the
pull request. Add targeted tests when they can meaningfully verify the behavior.
Documentation-only changes require reviewing links and `git diff --check`, not a
full application build.

The initial setup has not verified the legacy build. Do not describe build or
runtime checks as passing unless you actually ran them.
Use the current VS 2022 / v143 build rather than the inherited XP toolset. Do not
describe build or runtime checks as passing unless you actually ran them.

## Remotes and history

Expand All @@ -41,3 +52,32 @@ with attribution and license checks.

See [ROADMAP.md](ROADMAP.md) for planned work; listing a feature there does not
mean it is implemented or validated.

## Git and editor policy

Run `./build/setup-git.ps1` once per clone to install repository-local settings
and the tracked pre-commit hook. This does not change global settings or author
identity. Check `git config --local user.name` and `git config --local user.email`
before committing; configure your own identity locally if needed.

Commits must each cover one logical change, with matching documentation and
relevant validation. Separate dependency upgrades, build work, policy, formatting,
and features. Stage explicit paths or hunks and inspect `git diff --cached`.
Run `./build/check-staged.ps1` before each commit; the hook also runs it. This
checks staged whitespace and rejects known generated/private file types, including
force-added ignored files. It does not replace review or detect every secret.
Commit completed work without accumulating unrelated changes. Use short subjects
such as `fix(scintilla): ...`, `build: ...`, or `chore: ...`.

Pulls are fast-forward-only, pushes use `simple`, and fetch prunes stale remote
tracking branches. Never rewrite published history or force-push shared branches.
Local hooks are a convenience, not server-side enforcement; do not bypass them
to hide failures. Review merges and publishing separately.

Use an editor with EditorConfig support. Application source uses two-space
indentation; vendored Scintilla retains its tab conventions. Git normalizes declared
first-party text to LF in the index, with CRLF checkouts for C/C++ and Windows
build files and LF for docs/scripts. Legacy encodings, UTF-16 resources/INI files,
and vendor bytes are preserved. Do not run whole-file formatting or blanket
UTF-8 conversion. Put any deliberate first-party line-ending normalization in
its own commit; never mix it with behavior changes.
Loading