Skip to content

v3.0.4 — Line Endings & Pictures in Notes

Choose a tag to compare

@github-actions github-actions released this 18 Nov 14:20
· 25 commits to main since this release
v3.0.4
6f163ed

A fix release: a note with Windows line endings is no longer shown as changed, or rewritten, when it is opened, and a picture can be dragged into a note and, on some systems, pasted.

⚠️ Things that work differently after updating

  • A note keeps the line endings its file has. Up to 3.0.3, a note with Windows line endings (\r\n) was written with \n on every line at its first save, and auto-save did that about 30 seconds after the note was opened. Notes that an earlier version rewrote stay as they are now; Noteriv does not convert them back.
  • An image file dropped onto a note is saved under a name that works in a link: my cat (1).png becomes my-cat-1.png.

📝 Line endings

  • A note with Windows line endings no longer shows as changed when you open it (#53). The dot on the tab and "unsaved" in the status bar appeared in Edit, View and Source mode with no key pressed.
  • Opening such a note no longer rewrites it. Up to 3.0.3, auto-save then saved the note with \n on every line. Where git converts line endings itself (core.autocrlf), git diff showed nothing, as in #53. Elsewhere it showed every line as changed.
  • Saving writes what you changed and nothing else. The file keeps \r\n, and only the lines you edited differ. The same goes for a note in a pop-out window.
  • A file that mixes both kinds of line ending is left as it is until you change the note. It is then saved with the kind most of its lines have.
  • A note with Windows line endings that another program or a sync changes while it is open is loaded again. It used to be marked "external change".
  • Tested on Linux: in the published 3.0.3 AppImage, of seven test notes the four with Windows line endings showed "unsaved" on opening and were rewritten within 36 seconds. In this version all seven show "saved" in all three modes and are byte for byte the same afterwards. An edit, a ticked checkbox in View mode and typing in a pop-out each changed one line. Not run on Windows or macOS.

🖼️ Pictures

  • Drag image files onto a note (#52). Each one is copied into the attachment folder and shown where you let go of it. In 3.0.3 a dropped image was not added: the app took the drop before the editor saw it.
  • Paste a picture into a note with Ctrl+V (#52), where the system hands the picture to the app. It is saved in the attachment folder as pasted-image-<date>-<time>.png and shown at the cursor.
  • Pasting does not work everywhere yet. On Linux it worked with WebKitGTK 2.54.2 (the .rpm build on Fedora 45). With WebKitGTK 2.50.4 the paste arrives empty and nothing happens, as in 3.0.3: that is the version the AppImage carries and the one Ubuntu 22.04 has. The Flatpak and other distributions were not tried, and neither were Windows and macOS. Where pasting does nothing, save the picture to a file and drag it in.
  • When the picture ends its line, the cursor moves to a new line below it, so the picture shows at once.
  • .png, .jpg, .jpeg, .gif, .webp, .svg and .bmp are taken. If the folder already has a file of that name, the new one gets a number, as in photo-1.png. No file is written over. A file that is already in the vault is linked where it is.
  • If the clipboard holds text as well as a picture, as it does for cells copied from a spreadsheet, the text is pasted as before.
  • An image file copied in a file manager cannot be pasted on Linux. Drag it onto the note instead.
  • Tested on Linux: dropping one file and several in Edit and Source mode, at 2x display scale, and in the published AppImage. Pasting a bitmap in Edit mode and in a pop-out window with WebKitGTK 2.54.2; in the published AppImage a paste did nothing. If a paste or a drop does nothing for you, please say so in #52 and name your system and how you installed Noteriv.

📎 Other

  • Tested: a published 3.0.3 AppImage found this release, downloaded it, replaced itself and restarted as 3.0.4. The Windows and macOS update files are signed and checked against the app's key, but those installs were not run.
  • Docs: dragging and pasting pictures, and what Noteriv does with line endings.
  • Bumped the desktop app version to 3.0.4 across package.json, Cargo.toml, tauri.conf.json, and their lockfiles.