Repository navigation
v0.1.23
Images on the grid where a client sends them, a menu panel that picks the side with room, and a result list with a bottom.
New
terminal::kittyis the graphics protocol, taken off the stream ahead of the parser.vteroutes an APC run into a discard state and offersPerformno hook to catch it, sokitty::Scannersplits those runs out first and hands the rest on toalacritty_terminalunchanged, in order. It holds its state across feeds, since a pty read ends wherever the kernel filled the buffer.kitty::Storeassembles a chunked transmission under its id and holds 64 images of up to 64 MiB each, oldest dropped.a=t,a=T,a=qanda=dby id or all;f=24,f=32andf=100. Direct transmission only — a file, a temp file, shared memory ando=zcompression are answeredENOTSUPPORTEDrather than left unanswered, which is what keeps a client from waiting on a reply that never comes.q=1andq=2are read off the chunk that stated the transmission's keys, not the one that ended it.Emulator::placementsis where the images on the visible grid sit, in cells. Each anchors on a private-use zerowidth char written onto its top-left cell, so it rides the grid's own scroll, scrollback and reflow:alacritty_terminalexposes no absolute line number and no scroll callback, and a side table keyed by line drifts the first time output scrolls.Emulator::set_cell_sizeis what turns an image's pixels into rows and columns, and an image that arrives before the first frame is stored unplaced until one does.Emulator::selection_textdrops the anchors, so copying across an image pastes no character nobody can see.view::Imagesdecodes what the store holds into the BGRA frames gpui paints and caches them across frames, keyed by the client's id;GridSnapshot::imagescarries them toTerminalElement, which paints each over the cell backgrounds and under the glyphs — where kitty puts an image of the default z-index.scroll::Beyondis what lies past a drifting pane's edge, and so whether a pointer carried out there is still aiming at the pane.Nothingholds full speed for as long as the pointer is outside, which is a board that fills the window;Neighbourstops at the edge, because what the pointer is over now belongs to somebody else.scroll::pane_velocityis the ramp for both axes on its own, abovedrift_velocity.scroll::Viewport::track_scrollhands a viewport aScrollHandleof the caller's — whatScrollHandle::scroll_to_itemneeds to reach one of its children. Left unset the viewport keeps a handle of its own, as before.- A searchable picker's result list shows twelve rows and scrolls past that, so a palette over hundreds of commands opens the same size as one over twenty. The query line stays above the scroller, since it is what the rows are an answer to. The arrows scroll the highlighted row into view — following the selection rather than leading it, so a wheel stays the reader's — and a new query returns the list to the top.
CommandPaletteandComboboxboth. popover::submenu::placefits a panel beside a rectangle rather than around gpui's point: a submenu opens to the right of the card it hangs on, or to its left where the window has no room on the right, and slides vertically the way every menu does.popover::Chainis the side one open tree settled on, shared by every panel in it — a panel that had to flip is one whose children have no room to the right either, and a deeper panel deciding alone would open back across its parent.
Changed
scroll::drifttakes ascroll::Beyond. PassBeyond::Nothingfor what it did before.GridSnapshotcarries animagesfield. A host that never shows graphics addsimages: Vec::new(); one that does holds aview::Imagesbeside its emulator, callsEmulator::set_cell_sizefrom the grid hook with the metrics it is handed, and fills the field fromImages::placed.popover::anchored_submenutakes the open menu'spopover::Chainand mounts on a row that isrelative()— the row is what it measures the parent card's edges from.menu::cardpasses its own, one per render; a caller driving panels by hand holds one the same way.
Fixed
- A submenu near the window's right edge no longer opens across the card that dropped it. gpui's
anchoredfits a layer to the window around a point, and the point here was the parent card's own right edge: snapping slid the panel left over the card, andSwitchAnchormirrored it about that edge onto almost exactly the same place. A submenu has to clear a rectangle, which is whatpopover::submenu::placeworks from.