mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-14 04:28:00 +02:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1bfb1de7fc | ||
|
|
f3d8cf5d29 | ||
|
|
beb42d571b | ||
|
|
5e2fc4e90f | ||
|
|
48070ff38e | ||
|
|
57b6cec900 | ||
|
|
55417e4269 | ||
|
|
9837531b63 | ||
|
|
149a26ce51 | ||
|
|
4aeb32cc4f | ||
|
|
85280b0304 | ||
|
|
c57f65079f | ||
|
|
80d544c19f | ||
|
|
827a70bb86 |
@@ -50,6 +50,18 @@ consumption to do the same tasks.
|
||||
Detailed list of changes
|
||||
-------------------------------------
|
||||
|
||||
0.35.1 [2024-05-31]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- Wayland: Fix a regression in 0.34 that caused the tab bar to not render in second and subsequent OS Windows under Hyprland (:iss:`7413`)
|
||||
|
||||
- Fix a regression in the previous release that caused horizontal scrolling via touchpad in fullscreen applications to be reversed on non-Wayland platforms (:iss:`7475`, :iss:`7481`)
|
||||
|
||||
- Fix a regression in the previous release causing an error when setting background_opacity to zero (:iss:`7483`)
|
||||
|
||||
- Image display: Fix cursor movement and image hit region incorrect for image placements that specify only a number of rows or columns to display in (:iss:`7479`)
|
||||
|
||||
|
||||
0.35.0 [2024-05-25]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -20,6 +20,12 @@ images and other types of documents directly in your terminal, even over SSH.
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
A terminal PDF/DJVU/CBR viewer
|
||||
|
||||
.. _tool_tdf:
|
||||
|
||||
`tdf <https://github.com/itsjunetime/tdf>`_
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
A terminal PDF viewer
|
||||
|
||||
.. _tool_mdcat:
|
||||
|
||||
`mdcat <https://github.com/lunaryorn/mdcat>`_
|
||||
|
||||
2
glfw/wl_init.c
vendored
2
glfw/wl_init.c
vendored
@@ -224,7 +224,7 @@ pointer_handle_frame(void *data UNUSED, struct wl_pointer *pointer UNUSED) {
|
||||
if (x != 0.0f || y != 0.0f) {
|
||||
float scale = (float)_glfwWaylandWindowScale(window);
|
||||
y *= scale; x *= scale;
|
||||
_glfwInputScroll(window, x, y, highres, _glfw.wl.xkb.states.modifiers);
|
||||
_glfwInputScroll(window, -x, y, highres, _glfw.wl.xkb.states.modifiers);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
4
glfw/wl_window.c
vendored
4
glfw/wl_window.c
vendored
@@ -896,6 +896,7 @@ attach_temp_buffer_during_window_creation(_GLFWwindow *window) {
|
||||
static void
|
||||
loop_till_window_fully_created(_GLFWwindow *window) {
|
||||
if (!window->wl.window_fully_created) {
|
||||
GLFWwindow *ctx = glfwGetCurrentContext();
|
||||
debug("Waiting for compositor to send fractional scale for window %llu\n", window->id);
|
||||
monotonic_t start = monotonic();
|
||||
while (!window->wl.window_fully_created && monotonic() - start < ms_to_monotonic_t(300)) {
|
||||
@@ -904,6 +905,9 @@ loop_till_window_fully_created(_GLFWwindow *window) {
|
||||
}
|
||||
}
|
||||
window->wl.window_fully_created = true;
|
||||
// If other OS windows were resized when this window is shown, the ctx might have been changed by
|
||||
// user code, restore it to whatever it was at the start.
|
||||
if (glfwGetCurrentContext() != ctx) glfwMakeContextCurrent(ctx);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
go.mod
2
go.mod
@@ -4,7 +4,7 @@ go 1.22
|
||||
|
||||
require (
|
||||
github.com/ALTree/bigfloat v0.2.0
|
||||
github.com/alecthomas/chroma/v2 v2.13.0
|
||||
github.com/alecthomas/chroma/v2 v2.14.0
|
||||
github.com/bmatcuk/doublestar/v4 v4.6.1
|
||||
github.com/dlclark/regexp2 v1.11.0
|
||||
github.com/edwvee/exiffix v0.0.0-20240229113213-0dbb146775be
|
||||
|
||||
8
go.sum
8
go.sum
@@ -1,9 +1,9 @@
|
||||
github.com/ALTree/bigfloat v0.2.0 h1:AwNzawrpFuw55/YDVlcPw0F0cmmXrmngBHhVrvdXPvM=
|
||||
github.com/ALTree/bigfloat v0.2.0/go.mod h1:+NaH2gLeY6RPBPPQf4aRotPPStg+eXc8f9ZaE4vRfD4=
|
||||
github.com/alecthomas/assert/v2 v2.6.0 h1:o3WJwILtexrEUk3cUVal3oiQY2tfgr/FHWiz/v2n4FU=
|
||||
github.com/alecthomas/assert/v2 v2.6.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
|
||||
github.com/alecthomas/chroma/v2 v2.13.0 h1:VP72+99Fb2zEcYM0MeaWJmV+xQvz5v5cxRHd+ooU1lI=
|
||||
github.com/alecthomas/chroma/v2 v2.13.0/go.mod h1:BUGjjsD+ndS6eX37YgTchSEG+Jg9Jv1GiZs9sqPqztk=
|
||||
github.com/alecthomas/assert/v2 v2.7.0 h1:QtqSACNS3tF7oasA8CU6A6sXZSBDqnm7RfpLl9bZqbE=
|
||||
github.com/alecthomas/assert/v2 v2.7.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
|
||||
github.com/alecthomas/chroma/v2 v2.14.0 h1:R3+wzpnUArGcQz7fCETQBzO5n9IMNi13iIs46aU4V9E=
|
||||
github.com/alecthomas/chroma/v2 v2.14.0/go.mod h1:QolEbTfmUHIMVpBqxeDnNBj2uoeI4EbYP4i6n68SG4I=
|
||||
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
|
||||
github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
|
||||
github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I=
|
||||
|
||||
@@ -838,7 +838,7 @@ func EntryPoint(parent *cli.Command) {
|
||||
func specialize_command(ssh *cli.Command) {
|
||||
ssh.Usage = "arguments for the ssh command"
|
||||
ssh.ShortDescription = "Truly convenient SSH"
|
||||
ssh.HelpText = "The ssh kitten is a thin wrapper around the ssh command. It automatically enables shell integration on the remote host, re-uses existing connections to reduce latency, makes the kitty terminfo database available, etc. It's invocation is identical to the ssh command. For details on its usage, see :doc:`/kittens/ssh`."
|
||||
ssh.HelpText = "The ssh kitten is a thin wrapper around the ssh command. It automatically enables shell integration on the remote host, re-uses existing connections to reduce latency, makes the kitty terminfo database available, etc. Its invocation is identical to the ssh command. For details on its usage, see :doc:`/kittens/ssh`."
|
||||
ssh.IgnoreAllArgs = true
|
||||
ssh.OnlyArgsAllowed = true
|
||||
ssh.ArgCompleter = cli.CompletionForWrapper("ssh")
|
||||
|
||||
@@ -1325,7 +1325,7 @@ class Boss:
|
||||
tm.resize()
|
||||
|
||||
def _set_os_window_background_opacity(self, os_window_id: int, opacity: float) -> None:
|
||||
change_background_opacity(os_window_id, max(0.1, min(opacity, 1.0)))
|
||||
change_background_opacity(os_window_id, max(0.0, min(opacity, 1.0)))
|
||||
|
||||
@ac('win', '''
|
||||
Set the background opacity for the active OS Window
|
||||
|
||||
@@ -22,7 +22,7 @@ class Version(NamedTuple):
|
||||
|
||||
appname: str = 'kitty'
|
||||
kitty_face = '🐱'
|
||||
version: Version = Version(0, 35, 0)
|
||||
version: Version = Version(0, 35, 1)
|
||||
str_version: str = '.'.join(map(str, version))
|
||||
_plat = sys.platform.lower()
|
||||
is_macos: bool = 'darwin' in _plat
|
||||
|
||||
@@ -798,14 +798,26 @@ static void
|
||||
update_dest_rect(ImageRef *ref, uint32_t num_cols, uint32_t num_rows, CellPixelSize cell) {
|
||||
uint32_t t;
|
||||
if (num_cols == 0) {
|
||||
t = (uint32_t)(ref->src_width + ref->cell_x_offset);
|
||||
num_cols = t / cell.width;
|
||||
if (t > num_cols * cell.width) num_cols += 1;
|
||||
if (num_rows == 0) {
|
||||
t = (uint32_t)(ref->src_width + ref->cell_x_offset);
|
||||
num_cols = t / cell.width;
|
||||
if (t > num_cols * cell.width) num_cols += 1;
|
||||
} else {
|
||||
double height_px = cell.height * num_rows + ref->cell_y_offset;
|
||||
double width_px = height_px * ref->src_width / (double) ref->src_height;
|
||||
num_cols = (uint32_t)ceil(width_px / cell.width);
|
||||
}
|
||||
}
|
||||
if (num_rows == 0) {
|
||||
t = (uint32_t)(ref->src_height + ref->cell_y_offset);
|
||||
num_rows = t / cell.height;
|
||||
if (t > num_rows * cell.height) num_rows += 1;
|
||||
if (num_cols == 0) {
|
||||
t = (uint32_t)(ref->src_height + ref->cell_y_offset);
|
||||
num_rows = t / cell.height;
|
||||
if (t > num_rows * cell.height) num_rows += 1;
|
||||
} else {
|
||||
double width_px = cell.width * num_cols + ref->cell_x_offset;
|
||||
double height_px = width_px * ref->src_height / (double)ref->src_width;
|
||||
num_rows = (uint32_t)ceil(height_px / cell.height);
|
||||
}
|
||||
}
|
||||
ref->effective_num_rows = num_rows;
|
||||
ref->effective_num_cols = num_cols;
|
||||
|
||||
@@ -973,7 +973,7 @@ scroll_event(double xoffset, double yoffset, int flags, int modifiers) {
|
||||
s = scale_scroll(screen->modes.mouse_tracking_mode, xoffset, is_high_resolution, &screen->pending_scroll_pixels_x, global_state.callback_os_window->fonts_data->cell_width);
|
||||
if (s) {
|
||||
if (screen->modes.mouse_tracking_mode) {
|
||||
int sz = encode_mouse_scroll(w, s < 0 ? 6 : 7, modifiers);
|
||||
int sz = encode_mouse_scroll(w, s > 0 ? 6 : 7, modifiers);
|
||||
if (sz > 0) {
|
||||
mouse_event_buf[sz] = 0;
|
||||
for (s = abs(s); s > 0; s--) {
|
||||
|
||||
@@ -67,7 +67,7 @@ equal to the specified value, otherwise it will be set to the specified value.
|
||||
raise OpacityError('You must turn on the dynamic_background_opacity option in kitty.conf to be able to set background opacity')
|
||||
windows = self.windows_for_payload(boss, window, payload_get)
|
||||
for os_window_id in {w.os_window_id for w in windows if w}:
|
||||
val: float = payload_get('opacity')
|
||||
val: float = payload_get('opacity') or 0.
|
||||
if payload_get('toggle'):
|
||||
current = background_opacity_of(os_window_id)
|
||||
if current == val:
|
||||
|
||||
@@ -548,7 +548,7 @@ class TestGraphics(BaseTest):
|
||||
def test_image_put(self):
|
||||
cw, ch = 10, 20
|
||||
s, dx, dy, put_image, put_ref, layers, rect_eq = put_helpers(self, cw, ch)
|
||||
self.ae(put_image(s, 10, 20)[1], 'OK')
|
||||
self.ae(put_image(s, cw, ch)[1], 'OK')
|
||||
l0 = layers(s)
|
||||
self.ae(len(l0), 1)
|
||||
rect_eq(l0[0]['src_rect'], 0, 0, 1, 1)
|
||||
@@ -556,7 +556,7 @@ class TestGraphics(BaseTest):
|
||||
self.ae(l0[0]['group_count'], 1)
|
||||
self.ae(s.cursor.x, 1), self.ae(s.cursor.y, 0)
|
||||
src_width, src_height = 3, 5
|
||||
iid, (code, idstr) = put_ref(s, num_cols=s.columns, x_off=2, y_off=1, width=src_width, height=src_height,
|
||||
iid, (code, idstr) = put_ref(s, num_cols=s.columns, num_lines=1, x_off=2, y_off=1, width=src_width, height=src_height,
|
||||
cell_x_off=3, cell_y_off=1, z=-1, placement_id=17)
|
||||
self.ae(idstr, f'i={iid},p=17')
|
||||
l2 = layers(s)
|
||||
@@ -566,15 +566,16 @@ class TestGraphics(BaseTest):
|
||||
self.ae(l2[0]['group_count'], 2)
|
||||
left, top = -1 + dx + 3 * dx / cw, 1 - 1 * dy / ch
|
||||
right = -1 + (1 + s.columns) * dx
|
||||
width_px = ((right - left) / 2) * (cw * s.columns)
|
||||
height_px = width_px * (src_height / src_width)
|
||||
bottom = top - (height_px / (ch * s.lines)) * 2
|
||||
bottom = 1 - dy
|
||||
rect_eq(l2[0]['dest_rect'], left, top, right, bottom)
|
||||
self.ae(s.cursor.x, 0), self.ae(s.cursor.y, 1)
|
||||
self.ae(put_image(s, 10, 20, cursor_movement=1)[1], 'OK')
|
||||
self.ae(s.cursor.x, 0), self.ae(s.cursor.y, 1)
|
||||
s.reset()
|
||||
self.assertEqual(s.grman.disk_cache.total_size, 0)
|
||||
self.ae(put_image(s, 2*cw, 2*ch, num_cols=3)[1], 'OK')
|
||||
self.ae((s.cursor.x, s.cursor.y), (3, 2))
|
||||
rect_eq(layers(s)[0]['dest_rect'], -1, 1, -1 + 3 * dx, 1 - 3*dy)
|
||||
|
||||
def test_image_layer_grouping(self):
|
||||
cw, ch = 10, 20
|
||||
|
||||
Reference in New Issue
Block a user