Commit Graph

18581 Commits

Author SHA1 Message Date
Kovid Goyal
9dca948e9b Restrict echo to only allow characters 0-9 2026-07-26 16:05:13 +05:30
Kovid Goyal
4dd3156ca7 Drop wide (two cell) characters on width one windows 2026-07-26 10:08:26 +05:30
Kovid Goyal
9836cec19a Update changelog
Fixes #10284
2026-07-26 09:32:05 +05:30
Kovid Goyal
80ec1e36ea Merge branch 'fix-drag-icon-listener-abort' of https://github.com/ranicharradi/kitty 2026-07-26 09:30:10 +05:30
ranicharradi
16da6532f0 Wayland: fix abort when dragging a tab out
drag_icon_surface_listener is registered with only .enter and .leave.
wl_compositor is bound at version 6 whenever the compositor offers it,
so the drag icon surface receives wl_surface.preferred_buffer_scale
(opcode 2) and libwayland aborts on the NULL listener slot:

    listener function for opcode 2 of wl_surface is NULL

Add no-op handlers for both version 6 events, matching surfaceListener.
The drag icon's scale is already fixed at drag start from the source
window, via viewport destination or wl_surface_set_buffer_scale, so
ignoring the compositor's later preference preserves existing behavior.

Fixes #10284
2026-07-26 00:48:26 +01:00
Kovid Goyal
4f2f6a076b version 0.48.1 nightly v0.48.1 2026-07-24 15:03:34 +05:30
Kovid Goyal
612e2f63a8 Merge branch 'copilot/fix-issue-10278' of https://github.com/kovidgoyal/kitty
Fixes #10278
2026-07-24 10:28:04 +05:30
copilot-swe-agent[bot]
154da55152 fix: edge=none panel height shrinks with margin_top on macOS (issue #10278) 2026-07-24 04:53:39 +00:00
Kovid Goyal
43478ffed9 Make block on xdg output information more robust
Now does not block forever if output has zero size
2026-07-24 10:08:59 +05:30
Kovid Goyal
cff2ecedfb Merge branch 'wayland-origin-monitor-heuristic' of https://github.com/egnor/kitty 2026-07-24 09:59:49 +05:30
Dan Egnor
17d5103652 Wayland: guess the origin (0,0) output for a fresh window's fractional scale
When there is no focused or recently-focused window to key off of (the
typical first-window-at-startup case), glfwGetWaylandCurrentMonitorFractionalScale
fell back to the registry-first output (monitors[0]). Registry/connector
order is semi-arbitrary and uncorrelated with where a compositor actually
places a new window, so on a multi-monitor setup with mixed fractional
scales the first window could be born at the wrong size.

Prefer the output at the logical origin (0, 0) instead: the compositor's
top-left/primary output is a better guess for initial placement than
registry order. Fall back to monitors[0] when no output reports (0, 0).

Since xdg_output geometry (including position) arrives asynchronously and
x/y read zero until it does, wait for every monitor's logical geometry
before trusting the reported positions, so an as-yet-unpositioned output
cannot spuriously match (0, 0).

Discussed in #10268.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VjwP6hQjA6GMuiM7Mf9VAx
2026-07-23 12:34:19 -07:00
Kovid Goyal
51116e5df3 ... 2026-07-21 15:34:38 +05:30
Kovid Goyal
e36f6ac1b8 Use most recently focused OS Window when available to guess the monitor to use for fractional scale
Slight improvement in odds of guessing right for subsequent OS Windows.
2026-07-21 13:02:23 +05:30
Kovid Goyal
a8132195d1 ... 2026-07-21 10:16:35 +05:30
Kovid Goyal
bb1088a87a Wayland: Fix using remote control to resize OS windows on some tiling compositors leading to broken rendering 2026-07-21 10:12:34 +05:30
Kovid Goyal
6ed833e163 Wayland: get initial window size in cells working in most cases on hyprland/sway with fractional scaling by using the fractional scale of the primary monitor 2026-07-21 10:03:40 +05:30
Kovid Goyal
a7d7183681 ... 2026-07-21 09:11:50 +05:30
Kovid Goyal
fe9828a0e4 Workaround for dragging not starting on niri
niri for some reason known only to itself does not send any pointer
leave/data device enter/data source events when it accepts a grab. The
only event it seems to send is surface enter on the drag icon surface,
and that too it sends that event much later.

Handle this bonkers behavior by retrying the sync multiple times to
detect if niri has accepted the drag or not.

Fixes #10271
2026-07-21 09:04:45 +05:30
Kovid Goyal
e1414bfcdd Add a note to initial window size docs saying its the typical Wayland potluck whether it works 2026-07-21 08:07:18 +05:30
Kovid Goyal
2f7b2f6d4f Merge branch 'patch-1' of https://github.com/I21b/kitty 2026-07-21 07:20:18 +05:30
don’t have a name currently
b1373eb73b Update long_text of mark2_background
Seems like a typo
2026-07-21 07:30:10 +08:00
Kovid Goyal
0a751263c1 Revert 946867b as it breaks window sizing on some compositors
Fixes #10268
2026-07-20 19:58:00 +05:30
Kovid Goyal
ccc2bba92a Merge branch 'dependabot/github_actions/actions-02548105cf' of https://github.com/kovidgoyal/kitty 2026-07-20 09:17:59 +05:30
dependabot[bot]
fd3126f4e1 Bump github/codeql-action from 4.36.3 to 4.37.0 in the actions group
Bumps the actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 4.36.3 to 4.37.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v4.36.3...v4.37.0)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.37.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-20 03:45:23 +00:00
Kovid Goyal
0e38ca2b86 Merge branch 'wayland-initial-window-size' of https://github.com/egnor/kitty 2026-07-19 13:49:39 +05:30
Dan Egnor
db14d7c220 Wayland: map first window at correct size with fractional scaling
The first OS window on Wayland is created at scale 1 because the
compositor only sends the fractional scale after the surface exists.
The initial size in cells is therefore computed with scale-1 cell
metrics and the window is mapped a few cells too small. The existing
post-map recompute calls glfwSetWindowSize(), but on Wayland that loses
to the compositor's authoritative configure, which re-asserts the size
it recorded at map time. So a window that receives focus (the normal
interactive case) stays too small; a background window that never gets
an activated configure happens to keep the resized value, which is why
it can look fixed.

Correct the size while the window is still unmapped instead. GLFW gains
a hook (glfwWaylandSetInitialWindowSizeCallback) that it invokes when
the fractional scale is applied during creation -- mutter, kwin and niri
send the scale before the first configure -- letting the embedder
recompute the cell-based logical size for the real scale before the
window is mapped. The compositor then records the correct size and its
activation configure agrees, so there is nothing to race.

The existing post-map recompute is kept as a fallback for compositors
that only send the scale after the first configure (sway, Hyprland).

Also add glfwCocoaSetWindowLevel to the glfw.py wrapper generator list:
it was present in the committed glfw-wrapper but missing from the
generator, so regenerating the wrapper (required to add the hook above)
would otherwise drop it and break the macOS build.
2026-07-18 20:48:11 -07:00
Kovid Goyal
5b4ea1bbba version 0.48.0 v0.48.0 2026-07-18 07:37:54 +05:30
Kovid Goyal
4b7aac4999 macOS: Use a private API to ensure OS window is shown on the currently active space when toggled
Fixes #8740
2026-07-16 08:43:06 +05:30
Kovid Goyal
f47590533d Expose soft reset via Python API 2026-07-15 09:36:09 +05:30
Kovid Goyal
0816716c72 Add support for DECSTR soft screen reset escape code
This escape code is largely undefined. There is no specification for how
it affects alternate screen mode, overriden colors, kitty keyboard
state, paused rendering, etc. Do what I feel is sensible in these cases.

Fixes #10263
2026-07-15 09:28:51 +05:30
Kovid Goyal
41c82aa418 ... 2026-07-14 08:15:47 +05:30
Kovid Goyal
83ffaf60bf Bump some dependency versions 2026-07-14 06:15:01 +05:30
Kovid Goyal
40bbbf68e9 Merge branch 'dependabot/github_actions/actions-e1b61632c3' of https://github.com/kovidgoyal/kitty 2026-07-13 09:25:06 +05:30
Kovid Goyal
88bafe65d4 Merge branch 'dependabot/go_modules/all-go-deps-5889c72f55' of https://github.com/kovidgoyal/kitty 2026-07-13 09:24:45 +05:30
dependabot[bot]
8b368bf73f Bump github/codeql-action from 4.36.2 to 4.36.3 in the actions group
Bumps the actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 4.36.2 to 4.36.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v4.36.2...v4.36.3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.36.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-13 03:45:02 +00:00
dependabot[bot]
ed28c3b202 Bump the all-go-deps group with 3 updates
Bumps the all-go-deps group with 3 updates: [github.com/klauspost/compress](https://github.com/klauspost/compress), [golang.org/x/sys](https://github.com/golang/sys) and [golang.org/x/text](https://github.com/golang/text).


Updates `github.com/klauspost/compress` from 1.18.6 to 1.19.0
- [Release notes](https://github.com/klauspost/compress/releases)
- [Commits](https://github.com/klauspost/compress/compare/v1.18.6...v1.19.0)

Updates `golang.org/x/sys` from 0.46.0 to 0.47.0
- [Commits](https://github.com/golang/sys/compare/v0.46.0...v0.47.0)

Updates `golang.org/x/text` from 0.38.0 to 0.39.0
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.38.0...v0.39.0)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-version: 1.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-deps
- dependency-name: golang.org/x/sys
  dependency-version: 0.47.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-deps
- dependency-name: golang.org/x/text
  dependency-version: 0.39.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-13 03:42:57 +00:00
Kovid Goyal
45a97ee5af macOS: Disable macOS one time code autofill popups
Fixes #10250
2026-07-13 09:06:24 +05:30
Kovid Goyal
e966528a14 Update changelog 2026-07-13 09:00:26 +05:30
Kovid Goyal
2b7ac118fb Merge branch 'jq/bugfix-img-xyoff-scrolling' of https://github.com/jquast/kitty 2026-07-13 08:42:24 +05:30
Kovid Goyal
0bf176be5c Make latest version of ty happy 2026-07-13 08:21:56 +05:30
Jeff Quast
efeb4aead0 Fix erroneous scroll when using X/Y offsets in images
Problem
-------

In update_dest_rect() when both num_cols and num_rows are 0
(auto-computed, ``a=T``), the first block computes num_cols with
cell_x_offset, but, then the second block mismatches num_cols, causing
it to compute width_px from num_cols and adds cell_x_offset a second
time. The returned value is large enough that it often causes scrolling,
depending on size and location of the screen.

A sample visual program:

```python
import zlib, base64, time
from functools import partial
echo = partial(print, end='', flush=True)

echo('\033[H\033[J')

base = bytes([0, 128, 0, 255]) * 640 * 576
k = zlib.compress(keyframe, 3)
echo(f'\033[8;60H\033_Ga=T,i=1,q=1,f=32,s=640,v=576,o=z,N=1;{base64.b64encode(k).decode()}\033\\')
time.sleep(1)

delta = bytes([200, 0, 0, 255]) * 32 * 512
d = zlib.compress(delta, 3)
echo(f'\033[9;67H\033_Ga=T,i=100,q=1,f=32,s=32,v=512,o=z,N=1,X=9,Y=25;{base64.b64encode(d).decode()}\033\\')

time.sleep(1)
print()
```

Solution
--------

Add 'auto_cols' and 'auto_rows' to remember the original read-only
values before exercising their auto-calculated size. 'auto_rows' isn't
technically necessary given the logic branching but it describes in code
better.

Before and After video
----------------------

A video will be attached shortly, here.
2026-07-12 18:22:40 -04:00
Kovid Goyal
7ab90de166 Merge branch 'fix/text-cache-gc' of https://github.com/Sinity/kitty 2026-07-12 20:07:45 +05:30
Sinity
ed51a3e97c Benchmark unique multi-codepoint Unicode cells
Add a benchmark stream containing 262,144 distinct base-plus-combining-mark cells per repetition so TextCache collection cost remains visible instead of collapsing into cache hits.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 15:27:24 +02:00
Sinity
b8da20444e Run TextCache GC before drawing text
Move the periodic collection check to PREPARE_FOR_DRAW_TEXT so ordinary and fixed-width text share one safe integration point, while tab handling no longer initiates collection.

Reset the additions counter only after the live-cell remap completes successfully.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 15:27:24 +02:00
Kovid Goyal
3d64df7492 Update changelog 2026-07-12 12:16:01 +05:30
Kovid Goyal
faec5206d4 Merge branch 'master' of https://github.com/pakhromov/kitty 2026-07-12 12:14:44 +05:30
Kovid Goyal
e0f08269f8 Update changelog 2026-07-12 10:27:56 +05:30
Kovid Goyal
e71c49a17e Merge branch 'fix/historybuf-mmap' of https://github.com/Sinity/kitty 2026-07-12 10:24:14 +05:30
Kovid Goyal
368753682d scroll-window remote control command: Fix a regression that broke scrolling by pages
Fixes #10253
2026-07-12 09:59:34 +05:30
Kovid Goyal
f935258394 Ignore inapplicable CVE 2026-07-12 09:58:05 +05:30