Skip to content

v0.1.24

Choose a tag to compare

@clearloop clearloop released this 26 Sep 08:16
a5cafe6

The pointer reported to the programs that ask for it, a frame held whole through a synchronized update, and kitty images that stay where they were put.

New

  • Emulator::mouse_mode is what the running program wants done with the pointer — MouseTracking for 1000, 1002 and 1003, the 1006 and 1005 encodings, 1007 alternate scroll, and the alternate screen and DECCKM those last two read. view::mouse_bytes turns a MouseAction and a cell into the report the program is waiting for, and answers None where the event is the user's, which is the host's signal to run its own selection or scrollback instead. SGR names the button that came up and carries a grid past 223 columns; the original encoding numbers every release 3 and declines a cell it cannot name rather than reporting the wrong one. Alt and control travel on a report, and shift never does: it is how a user reaches the selection under a program holding the pointer.
  • Emulator::render_hold is a program asking for the screen to stop updating (mode 2026). While it is on, lines, line, cursor and placements serve the grid as it stood when the mode went on — the frame the program means to leave on screen, since nothing after the sequence that began the hold had been folded in yet. A selection made during one still washes, because a hold stops output rather than the pointer. The emulator has no clock and never ends a hold itself: Emulator::release_hold and emulator::HOLD_TIMEOUT are what a host arms so a program that dies mid-frame cannot freeze the grid. A resize ends one.
  • kitty::Display carries a display command's c, r and C keys, which is what Store::apply now answers an a=T with. c and r state the cell extent outright in place of the image's own pixels against the measured cell, and C=1 reserves no rows and moves no cursor — an image drawn over whatever is already there, which is what a program positioning its own frame wants.
  • The kitty keyboard protocol. Emulator::keyboard_mode reads back the flags a program pushed — alacritty_terminal keeps the mode stack, the alternate-screen swap and the CSI ? u query reply, all of which now run because the terminal is built with kitty_keyboard on. view::keystroke_bytes encodes against them: flag 1 takes Esc and the control and alt combos to CSI <code>;<modifiers>u and leaves every other key on its legacy encoding, flag 8 takes the text keys as well, flag 2 hangs a press, repeat or release off the modifier as a subparameter, and flag 16 carries the text the key produced. F3 moves to CSI 13~, its legacy CSI 1;<mod>R being a cursor position report. Flag 4 carries the shifted key in the first parameter's second subparameter, where shift is held. The base layout key is not served: gpui reports the active layout only.

Changed

  • kitty::Store::apply answers Option<kitty::Display> in place of Option<u32>. The image id is Display::image.
  • A placement anchors every cell of its top row rather than only its top-left, so text written over the left of an image leaves it where it was instead of taking it off the grid. Displaying an image takes its earlier placements with it, which is what keeps a program redrawing a frame to one placement per image.
  • view::keystroke_bytes takes an emulator::KeyboardMode in place of the app_cursor flag, which is now a field on it, a view::KeyEvent saying whether the key was pressed, held or let go, and the gpui::KeyLayout the platform reported for the press. gpui folds a shifted key into Keystroke::key for everything but a-z and clears Modifiers::shift with it, so shift-1 arrives as ! with no shift held; the kitty encoding reads the unshifted key and the shift bit off the layout, and the legacy encoding keeps using the folded key, which is the text that was typed. A host with no key-up path passes KeyEvent::Press, and one whose platform reports no layout passes None; Emulator::keyboard_mode fills the rest.
  • bezel-gpui 0.3.11, which is the release that reports KeyLayout.

Fixed

  • Light glass shows the backdrop it refracts. Light glass_regular was the measured material verbatim — gain 0.139 under a white tint at 214/255, which is 84% tint — and over a real blur a popover read as a white sheet with whatever sat behind it ghosting through. It now trades a third of that tint for gain (0.40 at 150/255), holding the tint.a / (1 - gain) product SurfaceSpec::flat reads so a build with no lens keeps the white panel it had; saturation comes down to 2.2 with it, 4.27 having been fit at 13.9% transmission. Theme::glass_overlay and Theme::card_glass_bg cover 0.55 and 0.60 in light where they covered 0.85.
  • A kitty image inside a synchronized update no longer lands under the frame's own text. vte buffers mode 2026 and replays it at ESU, and graphics leave the stream ahead of that buffer, so the image was placed against the cursor the frame had not moved yet and the replay then wrote over its anchor. emulator::NoSync turns the buffering off — every byte now reaches the grid in the order the program wrote it — and the frame is held in the emulator instead.
  • A named key held with a modifier now states it as a CSI parameter: ctrl-left is CSI 1;5D and shift-delete is CSI 3;2~. Ctrl with a named key used to encode nothing at all, since caret notation has no byte for one, and shift with an arrow sent the arrow alone. A modifier also rules out the SS3 form, which has nowhere to put the parameter, so a modified arrow is CSI whatever DECCKM is set to.