Skip to content

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 08 Nov 18:38
· 136 commits to main since this release
c5821c2

One settings menu, two panels from 160 columns, text you can select and copy, and a viewer that
stays idle when nothing changes.

Added

  • Drag the mouse in a panel to select text, and let go to copy it to the clipboard (#71). The
    selection stays in that panel's code: the line numbers, the other panel and the minimap are
    never included. Dragging above or below the panel scrolls it. The copy is sent as an OSC 52
    escape code, so it works on Wayland and over SSH with no clipboard tool. In tmux this needs
    set-clipboard on. Shift-drag still uses the terminal's own selection.
  • One settings menu with three tabs, switched with Tab and Shift-Tab: Highlighting, Layout and
    Colors. c opens it on Colors and M on Highlighting. Changes take effect and are saved
    immediately; Enter and Esc only close the menu.
  • The Highlighting tab names each option in plain words and shows a live before/after example in
    the language of the open file (25 languages and plain text). It marks the text the selected
    option changes, and says when an option has no effect.
  • The width from which two panels are shown side by side can be set: on the Layout tab, as
    wide_columns in the config file, or with OMNIDIFF_WIDE_COLUMNS for one run (#70).

Changed

  • Two panels are shown from 160 columns, down from 200 (#70).
  • The theme editor no longer reverts on Esc; only a hex color being typed can still be cancelled.
  • The node highlight (H) and syntax highlighting (S) are rows in the settings menu too; the
    keys still work.

Fixed

  • An idle viewer no longer uses CPU (#72). It used to redraw 60 times a second whether or not
    anything had changed, which kept a GPU terminal repainting. Now it draws only after input or a
    change, and is silent after the first frame. Idle CPU went from 2-22% to about 0.5%. Each frame
    is also faster on files with many changes: 14 ms to 0.8 ms for 20,000 changes.
  • As git's external diff, omnidiff --headless titles each side with the file's path instead of
    git's temporary file. A renamed file shows its old and new paths, and an added or deleted file
    shows /dev/null on the missing side (#59).
  • The project site, showcase and apt repository are published again: the Pages build had been
    failing on every push to main.

Library

  • headless::run takes an extra titles argument; pass None to keep the file paths as titles.
  • Action: ThemeSelected, ThemePreviewed, SyntaxThemePreviewed and RenderOptionsAccepted
    are replaced by ThemeChanged, SyntaxThemeChanged, SyntaxHighlightingChanged,
    NodeHighlightChanged, PanelLayoutChanged, WideColumnsChanged, SettingsClosed and
    CopyToClipboard.
  • SINGLE_PANEL_THRESHOLD is now 160. New: diff::text::OPTION_INFO, tui::clipboard,
    tui::positional::display_names, tui::theme::WIDE_COLUMNS_ENV.