Commit Graph

17931 Commits

Author SHA1 Message Date
mcrmck
a368a90e37 Add directional drag-and-drop inserts for Vertical, Horizontal, Tall, Fat, Grid
Previously, body drops in all non-Splits layouts showed a full-window overlay
and performed a positional swap. This adds proper top/bottom or left/right
half-window overlays and true before/after insertion for the five layouts
Kovid identified.

Architecture:

- New `drag_overlay_mode` ClassVar on Layout ('full'|'axis_y'|'axis_x'|'free')
  controls both overlay display and valid direction axis. Layout subclasses set
  one line; tabs.py and boss.py dispatch on this attribute instead of hasattr.

- New `insert_window_group_next_to(target_group_id, after)` on WindowList
  performs a positional insert (not swap) by popping the active group and
  inserting it before or after the target.

- New base `insert_window_next_to` on Layout uses insert_window_group_next_to
  for axis_x/axis_y layouts and falls back to swap for 'full' (Stack).
  Splits overrides this with its existing tree-based implementation.

- `_insert_window_in_direction` in boss.py collapses from a 7-line hasattr
  branch to a single layout.insert_window_next_to() call.

Direction constraints:
  Vertical, Tall, Grid -> top/bottom (axis_y)
  Horizontal, Fat      -> left/right (axis_x)
  Splits               -> 4-way free (unchanged)
  Stack                -> full-window swap (unchanged)
2026-03-27 02:08:41 -04:00
Kovid Goyal
99d986c821 Merge branch 'copilot/fix-scrollbar-margin-issue' of https://github.com/kovidgoyal/kitty 2026-03-27 11:36:57 +05:30
copilot-swe-agent[bot]
df79b8247f Give hovered scrollbar precedence over window borders to prevent flickering
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/260f17ab-b8d3-4581-ae88-de6f6c011637

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-03-27 05:48:50 +00:00
copilot-swe-agent[bot]
24414f6189 Fix scrollbar hit region to account for window margin (issue #9756)
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/eb5869d6-9938-4ff3-87fb-34fe14694d6c

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-03-27 05:25:06 +00:00
Kovid Goyal
e8461b2a9f When running kittens use the last reported cwd when at a prompt 2026-03-27 09:09:30 +05:30
Kovid Goyal
203ea700f4 Merge branch 'copilot/fix-spurious-mouse-release-event' of https://github.com/kovidgoyal/kitty 2026-03-26 19:52:12 +05:30
copilot-swe-agent[bot]
efe319f755 Send synthetic left button release after drag ends to fix stale mouse state
Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/e3cf07a9-b3c0-4786-b264-a83b85f098ac
2026-03-26 14:16:44 +00:00
copilot-swe-agent[bot]
215bbf68de Fix spurious mouse release event during drag out of OS window
Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/f4f7b9e7-102b-4af7-aa03-4fb7a85d6ed0
2026-03-26 14:00:57 +00:00
Kovid Goyal
79713b3ddf Add a FAQ entry about grid size padding 2026-03-26 17:08:29 +05:30
Kovid Goyal
354d0780b2 Re-order FAQ 2026-03-26 17:03:06 +05:30
Kovid Goyal
d3133420ba Micro-optimization 2026-03-26 16:45:04 +05:30
Kovid Goyal
0c46783f5e Cleanup previous PR 2026-03-26 10:21:08 +05:30
Kovid Goyal
3411c61fa7 Merge branch 'copilot/refactor-shortcut-tracker-match-function' of https://github.com/kovidgoyal/kitty 2026-03-26 10:08:03 +05:30
copilot-swe-agent[bot]
6a0efbfdba Refactor ShortcutTracker.Match() to respect AllowFallback priority order
Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/85fbf706-4688-4901-9a23-907cebc91da3
2026-03-26 04:31:37 +00:00
Kovid Goyal
1af334eed8 bump image dep for vuln 2026-03-26 09:43:58 +05:30
Kovid Goyal
9ea5441a2f ... 2026-03-26 09:39:33 +05:30
Kovid Goyal
88ee80b327 Cleanup previous PR
Actually respect the fallback order when finding matching shortcuts
2026-03-26 09:30:14 +05:30
Kovid Goyal
3e5b3eb55d Merge branch 'match-physical-keys' of https://github.com/keplian/kitty 2026-03-26 06:53:49 +05:30
Павел Мешалкин
8ffdf7d7ee feat: add per-mapping --allow-fallback for layout-independent shortcuts
Add --allow-fallback option to the map command that controls shifted
and ascii (alternate_key) fallback for individual key mappings.

For non-Latin keyboard layouts, when the current layout key is
non-ascii (codepoint > 127 and < 0xE000), the alternate_key from
the base layout is used for matching if the mapping opts in via
--allow-fallback=shifted,ascii.

Default kitty bindings use --allow-fallback=shifted,ascii so they
work out of the box with non-Latin layouts. User custom mappings
default to --allow-fallback=shifted (preserving existing shifted_key
behavior without ascii fallback).

--allow-fallback=none disables all fallback for a mapping.

Python side: parse_options_for_map() in options/utils.py handles flag
parsing, ShortcutMapping uses it in __init__. get_shortcut() filters
candidates by per-mapping allow_fallback.

Go side: ParseMap() handles --allow-fallback, KeyAction stores
AllowFallback, ShortcutTracker.Match passes it to matching.
MatchesParsedShortcut defaults to shifted,ascii for hardcoded shortcuts.

Migrated kittens (themes, command_palette, diff, choose_files) to
use ShortcutTracker with configurable map entries.

Tests added for Python (5 test methods) and Go (ParseMap + key matching).
2026-03-25 19:34:13 +03:00
Kovid Goyal
79bde7f9a9 Ignore inapplicable CVE in python 2026-03-25 20:20:17 +05:30
Kovid Goyal
f479c90533 Fix set_tab_title without prefilling not working 2026-03-25 20:16:15 +05:30
Kovid Goyal
0ddad7474b Cleanup previous PR 2026-03-25 09:23:29 +05:30
Kovid Goyal
95ca222eba Merge branch 'add-show-hyperlink-prefix-key' of https://github.com/zzhaolei/kitty 2026-03-25 08:56:46 +05:30
zhaolei
47d89faa23 Add modifier-based hyperlink target display 2026-03-25 11:06:00 +08:00
Kovid Goyal
2ce9d575ef Update changelog 2026-03-24 21:18:42 +05:30
Kovid Goyal
0e663ef8e3 Merge branch 'full-match-highlighting' of https://github.com/duvallj/kitty 2026-03-24 21:15:26 +05:30
Jack Duvall
c48111d92c Highlight full extent of hint matches, not just the prefix label
Add --hints-text-background-color option (default: auto) that can apply
a background color to the matched text after the hint label. This makes
it more clear exactly which text each hint covers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 11:23:30 -04:00
Kovid Goyal
64567a539b Merge branch 'fix-drag-tab' of https://github.com/zzhaolei/kitty 2026-03-24 19:16:37 +05:30
zhaolei
e78b7b1a99 Align drag thumbnail to cursor on macOS 2026-03-24 14:42:04 +08:00
mcrmck
606aa1543e Fix multi-OS-window drag bugs and KeyError crash on tab drag
Two fixes:

1. boss.py: scope window drag is_dest to the receiving OS window only.
   Previously all tab managers got is_dest=True with the same window-local
   coordinates. Since every OS window's viewport starts at (0,0), a drag at
   (x,y) in Window 1 also matched windows in Window 2 at the same coords,
   causing spurious highlights and incorrect drop-target state in the second
   window.

2. tabs.py: filter synthetic tab IDs (< 0) from all_tabs in on_tab_drop_move.
   The '+' new-tab indicator uses tab_id=-1. If a tab drag started while
   window_drag_active or tab_bar_show_new_tab_button was set, the -1 ended
   up in tab_being_dropped.tab_ids, then tab_bar_data crashed with KeyError
   when it tried tmap[-1].
2026-03-23 21:44:48 -04:00
Kovid Goyal
7038857090 Merge branch 'update-shell-nix' of https://github.com/duvallj/kitty 2026-03-24 06:05:15 +05:30
Jack Duvall
63a257591b Update shell.nix
According to
https://nixos.org/manual/nixpkgs/stable/#sec-darwin-legacy-frameworks,
the darwin.apple_sdk.framework namespace has been deprecated.

This commit updates shell.nix to be compatible with the nixos-unstable
channel on darwin. Tested by running `nix-shell --pure` and then `make`
inside that shell.
2026-03-23 17:26:53 -04:00
Kovid Goyal
7c963a67cf ... 2026-03-23 22:24:56 +05:30
Kovid Goyal
97d3cd889c Update changelog 2026-03-23 21:43:55 +05:30
Kovid Goyal
0907d27306 Merge branch 'copilot/fix-issue-9732-expose-session-name' of https://github.com/kovidgoyal/kitty 2026-03-23 21:08:42 +05:30
copilot-swe-agent[bot]
c2f6fd9155 Expose session_name in kitten @ ls output for each window (fix #9732)
Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/98770c1a-7605-4597-a5ce-f27b35315930
2026-03-23 15:21:46 +00:00
Kovid Goyal
e4b505b6ca Merge branch 'copilot/add-keyboard-repeat-delay-function' of https://github.com/kovidgoyal/kitty 2026-03-23 20:37:10 +05:30
copilot-swe-agent[bot]
6b86e7db5d Extend glfwGetKeyboardRepeatDelay() to return both initial delay and repeat interval
Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/bde9bf2e-a0dd-4ccd-8385-6a37be1e025f
2026-03-23 11:58:48 +00:00
copilot-swe-agent[bot]
998ee22ecb Add glfwGetKeyboardRepeatDelay() to the GLFW API for X11, Wayland and Cocoa
Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/4765810b-ecf5-4348-ae3a-ff0ff481aaae
2026-03-23 11:46:35 +00:00
Kovid Goyal
23b5e44ce5 Merge branch 'copilot/add-tests-for-graphics-fixes' of https://github.com/kovidgoyal/kitty 2026-03-23 11:12:51 +05:30
Kovid Goyal
407cfdf327 Merge branch 'dependabot/go_modules/all-go-deps-55bade0cd8' of https://github.com/kovidgoyal/kitty 2026-03-23 11:05:09 +05:30
dependabot[bot]
dc01c324a1 Bump the all-go-deps group with 2 updates
Bumps the all-go-deps group with 2 updates: [golang.org/x/image](https://github.com/golang/image) and [golang.org/x/text](https://github.com/golang/text).


Updates `golang.org/x/image` from 0.36.0 to 0.37.0
- [Commits](https://github.com/golang/image/compare/v0.36.0...v0.37.0)

Updates `golang.org/x/text` from 0.34.0 to 0.35.0
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.34.0...v0.35.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-version: 0.37.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.35.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-03-23 03:43:10 +00:00
copilot-swe-agent[bot]
b252524def Add tests for graphics protocol crash fixes (commits e9661f0 and 48ab623)
Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/52901924-cb01-416f-8d4c-56bc2872a3c6
2026-03-23 03:39:38 +00:00
Kovid Goyal
503e0a8acf Cleanup previous PR 2026-03-23 08:54:57 +05:30
Kovid Goyal
0c7f17a447 Merge branch 'palette-improvements' of https://github.com/dmgerman/kitty 2026-03-23 08:48:59 +05:30
Daniel M German
9619571dd3 Command palette: fix gofmt struct field alignment in tests 2026-03-22 17:59:42 -07:00
Daniel M German
6a3fe6ae01 Command palette: word-level search with multi-token cross-column matching
Implement a word-level scoring engine for the command palette that replaces
the previous FZF-based approach. Query tokens are matched against pre-tokenized
words in each column (key, action, category) with exact, prefix, and
edit-distance scoring. Multiple search terms are supported with cross-column
matching — items matching more tokens rank higher. Compound query tokens
containing delimiters (e.g. mouse_selection) are matched as units.

Add comprehensive tests using a Go builder API instead of raw JSON blobs,
covering single-token, multi-token, partial-match, ranking, mouse binding,
and unmapped action scenarios.

Add documentation for the command palette kitten.
2026-03-22 17:28:28 -07:00
mcrmck
82c6516718 Use tab_id < 0 instead of == -1 for synthetic tab check 2026-03-22 18:38:12 -04:00
mcrmck
fd6940a0aa Wire tab_bar_show_new_tab_button option into types.py and parse.py
Registers the new bool option so kitty can parse it from kitty.conf
and expose it via get_options(). Default is False (off).
2026-03-22 17:16:22 -04:00
mcrmck
3e85db684d Make always-visible '+' new tab button opt-in via tab_bar_show_new_tab_button
Default is 'no' to avoid forcing the button on all kitty users. When disabled,
the '+' indicator still appears during window drags as a drop target (existing
behaviour). Set to 'yes' to keep it permanently visible as a clickable button.
2026-03-22 17:13:08 -04:00