Breaking Changes
- Hover preview options moved into their own table:
links.hover_previewis nowlinks.hover_preview.enabled, andhover_preview_delay,hover_preview_widthandhover_preview_heightare nowdelay,widthandheightinside it (Lua:lektra.opt.links.hover_preview.enabled, ...). The old names are ignored. - More options moved into sub-tables, with
enabledfor the on/off switch (the old names are ignored; in Lua it is the same path, e.g.lektra.opt.split.focus_border.width):split.dim_inactive,split.focus_borderandsplit.maximize_indicator(wasdim_inactive,dim_inactive_opacity,focus_border_color, ...)annotations.<type>.glow(washover_glow,glow_width,glow_color) andannotations.<type>.comment(wascomment,comment_marker,comment_font_size; nowtooltip,marker,font_size)behavior.high_contrast,laser_pointer.trailandrendering.antialiasing(washigh_contrast_black_point,trail_fade_ms,antialiasing_bits, ...)highlight_matchesofpicker,outline,command_paletteandhighlight_search(washighlight_matchesandhighlight_matches_color)
- The statusbar's
filenamemodule now shows only the file name, not the whole path. Setstatusbar.components.filename.full_path = trueto get the path back. - Lua: event callbacks now receive one table,
event, instead of separate arguments: useevent.view(was the view argument),event.index,event.name,event.bookmark,event.screen,event.link, and so on.
New Features
--sync-viewssyncs zoom and scroll of the opened splits, e.g.lektra --vsplit --sync-views a.pdf a.pdf.--commandnow also runs with--vsplitand--hsplit(it was skipped before).annotations.glow(enabled,color,width) sets the hover glow of every annotation type at once;annotations.<type>.glowstill overrides it for one type.llm_view.max_history_messagessends only the last N of your messages (with the replies after them) to the model; the chat itself stays complete.- Markdown files show the images next to them (
). picker.style = "emacs"shows pickers as a full-width strip along the bottom of the window, like the Emacs minibuffer,picker.max_linesrows high. The default,"floating", is the card in the middle.picker.scrolloffkeeps some rows between the selection and the edge of the list.links.hover_preview.page_number = falsehides the page number under the link hover preview, and its frame is tighter around the picture.- The link hover preview now shows just the entry or paragraph the link points at (a reference, say), not the text around it;
links.hover_preview.heightis the most it shows andlinks.hover_preview.context(default 12 points) keeps a little above and below, and a short entry is centred in at least 40% of the height. show_header = falsehides the column headers of pickers. Set it inpickerfor all of them, or inoutline,highlight_searchorcommand_palettefor just that one.count_formatshows how many rows match next to the picker's search box: the first%sis the number of matches, the second the total, so"%s/%s"shows12/340. Same places asshow_header; empty (the default) shows nothing.caret.shapesets the caret in caret mode: a block over the character ("block", the default) or a thin line before it ("beam").grepcommand: lists the lines of the document that match a regular expression (smart-case) and jumps to the one you pick.grep PATTERNstarts with the pattern typed.- The default
layout.spacing(gap between pages) is now 12 pixels instead of 10, to leave room for the page shadow. - Pages have a soft shadow. Tune or turn it off with
rendering.page_shadow(enabled,radius,offset_y,color). - Lua:
view:search_hits()now returns the location of each search hit (it returned nothing before). rendering.antialiasing.bitsnow takes effect: it sets how smooth MuPDF draws pages (0 turns antialiasing off).- The message bar is tinted by level: blue for info, amber for warnings, red for errors.
lektra.ui.messagetakes an optionallevel. - Updated bundled MuPDF to 1.28.6.
--no-configstarts lektra with the default configuration, ignoringconfig.tomlandinit.lua.- Link hints can use letters: set
link_hints.charset(e.g."asdfghjkl"). - Lua:
view:link_hints("pick", callback)gives the chosen link to a script, andview:follow_link()accepts it. - Lua:
OnLinkClickedgives the followed link asevent.link. - Lua:
view:preview(target),view:open_portal(target)andview:close_portal(). - New options
behavior.text_cache_sizeandbehavior.stext_page_cache_sizeset how many pages of text are kept in memory for search and text selection. - Printing: the new
printcommand (Ctrl+P, File ▸ Print…) prints the document, or a range of its pages, to a printer or a PDF file. Lua:view:print(opts, callback). Not available for DjVu yet. - config.toml and Lua now accept the same options. New in config.toml:
promptfor every picker,outline.generate_heading_ratio,outline.generate_max_levelsandbehavior.open_last_visited. New in Lua:width,height,border,alternating_row_colorandshadowofoutline,highlight_searchandcommand_palette. - Unknown keys in config.toml are now reported, as are enum values that are not one of the choices (they used to fall back to the default silently).
- Lua: writing an option a value of the wrong type, or an option that does not exist, now shows a warning and leaves the option unchanged (it used to be turned into
falseor0). Enum options such aslayout.modealso accept their name, e.g."book". - New
messagescommand opens a Messages tab listing every message shown so far, including config.toml problems and Lua errors, so you can read them after they disappear.behavior.message_log_size(default 1000) sets how many are kept. Lua:lektra.ui.messages(). - The link hover preview now marks what the link points at: it shades the paragraph or reference entry there and dims the rest, and shows the full width of the column the target is in (lines used to be cut off on the right).
links.hover_preview.highlightpicksblock(default),line,marker(a square like the jump marker) ornone; the color isjump_marker.color.
Bug Fixes
- Fix a page sitting off-centre after zooming far out with the mouse wheel in the vertical layouts, which also made synced views drift apart.
- Fix the colors of
split.focus_border,split.maximize_indicatorandportal.border_colorbeing read in the wrong order: they now take#RRGGBBor#RRGGBBAAlike every other color. The default portal border is now the translucent white it was meant to be. - Fix a zoomed-in page staying blank after panning sideways in the vertical layouts (or up/down in the horizontal one).
- A zoomed-in page now shows a blurry preview of the part that is still rendering instead of a blank area.
- Pressing Enter on a directory in the file picker now opens it instead of closing the picker.
- Fix a long delay before the first window when a recent file is on an unreachable network mount.
- Dropping several files onto the window now respects
tabs.lazy_loadinstead of opening them all. - Fix a possible crash when a document is closed while it is still opening (slow EPUBs in particular).
- Fix the minimap becoming wider and fatter right after changing page.
- Fix a crash with a document that has no pages, such as a PDF that is still being written. It is no longer opened, and a reload keeps the current document.
- Closing the last tab no longer leaves "Start Page" or "Messages" in the statusbar.
- Fix lektra freezing when selecting text in highlight mode on an EPUB. Text markup is only available for PDFs.
- The
bookmark_removecommand now lists your bookmarks and deletes the one you pick (it did nothing before). - Fix the Nix flake failing with "MuPDF source not found". Use
git+https://github.com/dheerajshenoy/lektra?submodules=1as the flake URL. preview.size_rationow accepts fractions such as0.6(only whole numbers were read).- Fix
lektra.opt.picker.keys.<action> = ...writing to the wrong memory while a document was open.