Skip to main content

Pragtical v3.5.0 Release

· 3 min read
Jefferson Gonzalez

A new week and a new release with fixes and performance improvements!

Over the past few days, various people have helped by reporting issues on the GitHub issue tracker, and this release tackles some of them. One prominent change is the improvement in the way that coroutines are scheduled, resulting in overall better responsiveness and performance of the editor, an improvement that would not have been possible without the testing of AmerM137.

Also, while working on a not-yet-finished C++ native tokenizer (to see if we gain some better performance), I found that the utf8.len function accepts a lax parameter that allows calculating the length of the string without checking if it is invalid UTF-8 (we don't need this check since we are passing clean UTF-8 text to the tokenizer). Using this flag on the Lua tokenizer calls of ulen gives us over a 75% time reduction in the per-line tokenization process.

Another area that has seen improvements is in the startup and memory usage departments. We changed how the settings plugin deals with the global status of the scrollbar to not depend on a coroutine. In the memory department, we modified various core plugins that make use of weak document table keys to clear the content of these tables immediately after a document is closed. This change should result in the garbage collector kicking in sooner for cleanup of unused memory.

This release also introduces AppImage and Portable ARM64 Linux builds of the editor for people working on those platforms, as suggested by jvoisin.

For plugin developers, we introduced two new functions to deal with ignore files: core.get_ignore_file_rules() and common.match_ignore_rule(path, info, ignore_rules). Also, the editor version was aligned with the mod version, meaning that they are now the same.

Some other changes include:

  • Proper updates to the NoteBook widget on tab change.
  • Better DPI runtime awareness on Windows (special thanks to LeDominik, who performed macOS scale testing on previous releases, resulting in today's improvements).
  • Fixes to the regex C API that allow it to work properly on macOS ARM64 (reported by dilpreetsio).
  • Better borderless behavior when clicking window action buttons.
  • Fixes to window size restoration on startup.
  • Improvements to the findfile and projectsearch plugins in handling ignore files.

A big THANK YOU to everyone who reports issues!

Downloads on GitHub.

Changes Log

Performance Improvements

  • Lower input latency improving co-routine scheduling and tokenizer (#174)

  • Reduce the amount of co-routines needed on startup (#176)

  • Document lax param and use on tokenizer ulen calls (#183)

Enhancements

  • Added PerMonitor dpi awareness to windows manifest (#158)

  • Don't trust weak table keys to clean cached items (#164)

API

  • Introduce new ignore files handling functions (#177)

  • Use project version as mods version (#184)

Fixes

  • Fix issues with window size restoration (spotted on Windows) (#162)

  • IPC Plugin: restore current project working dir (#167)

  • If all documents are closed chdir to root project (#168)

  • findfile: use project when resolving file path (#169)

  • Fix regex api wrong value set to regex.ENDANCHORED (#170)

  • regex api: use proper type for options parameter (#171)

  • Do not maximize window on macOS at startup (#175)

  • Process TitleView button actions on mouse release (#178)

Build System

  • Add Linux AArch64 build target to CI (#157)

  • CI: Properly enable ccache for linux builds (#161)

Widgets

  • Allow scheduling core updates and redraws (a2637c37)

Lite XL Inherited Changes

  • DocView: check token_count not 0 (#1879)

  • Added in keyboard shortcut tooltips. (#1880)

  • Add primary selection support (#1729)