diff --git a/CHANGELOG.md b/CHANGELOG.md index 9127fbd..a3fa4cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to Notelet are documented here. The format follows [Keep a C ## [Unreleased] +## [0.1.3] - 2026-12-01 + +### Fixed + +- A code block keeps its syntax colours after `Ctrl+L` selects a line in it, or after `Ctrl+C` with nothing selected copies a code line. + ## [0.1.2] - 2026-11-30 ### Fixed @@ -33,7 +39,8 @@ First release of Notelet for Windows. - Export and Import of every note, sprint, setting and shortcut as one backup file. - Tray menu: the version, Open Notelet, Check for updates, Start with Windows, Help (What's new, Report a bug) and Quit Notelet. Notelet also checks for updates once a day and shows **Restart to update** when one is ready. -[Unreleased]: https://github.com/ttncode/notelet/compare/v0.1.2...HEAD +[Unreleased]: https://github.com/ttncode/notelet/compare/v0.1.3...HEAD +[0.1.3]: https://github.com/ttncode/notelet/compare/v0.1.2...v0.1.3 [0.1.2]: https://github.com/ttncode/notelet/compare/v0.1.1...v0.1.2 [0.1.1]: https://github.com/ttncode/notelet/compare/v0.1.0...v0.1.1 [0.1.0]: https://github.com/ttncode/notelet/releases/tag/v0.1.0 diff --git a/app/editor.js b/app/editor.js index 02564d9..b810c97 100644 --- a/app/editor.js +++ b/app/editor.js @@ -250,6 +250,8 @@ export class NoteEditor { const linesOf = new Map(blocks.map((block) => [block, splitCodeLines(block)])); const [anchor, focus] = ends.map((end) => (end.block ? pointInCodeLines(linesOf.get(end.block), end.textOffset) : end)); selection.setBaseAndExtent(anchor.node, anchor.offset, focus.node, focus.offset); + // The split replaces the code's text nodes, and the colours are ranges on the old ones. + refreshCodeColours(this.#element); } // Like VS Code's Ctrl+L: the first press selects the caret's line, each next one adds a line. diff --git a/desktop/Cargo.toml b/desktop/Cargo.toml index 3c1c9a6..4851341 100644 --- a/desktop/Cargo.toml +++ b/desktop/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "notelet" -version = "0.1.2" +version = "0.1.3" description = "Lightweight notes with sprint tracking" edition = "2021" publish = false diff --git a/package-lock.json b/package-lock.json index 603ee32..3963437 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "notelet", - "version": "0.1.2", + "version": "0.1.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "notelet", - "version": "0.1.2", + "version": "0.1.3", "devDependencies": { "@tauri-apps/cli": "^2.12.4", "linkedom": "^0.18.13" diff --git a/package.json b/package.json index 463159b..81a2de2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "notelet", - "version": "0.1.2", + "version": "0.1.3", "private": true, "type": "module", "scripts": {