mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Implement DnD protocol changes for symlinks and directory handling
- Remove unique identifier (device:inode) from directory listings - Change directory entry indexing from 1-based to 0-based - Add symlink handling in directories: respond with t=r:X=1 and target - Update parser to default cell_y to -1 for close handle detection - Update and extend tests for all new behaviors Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/d09883e5-f460-471d-9dcf-e64e7b96882f Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a92b381dc3
commit
d548afc94a
@@ -114,6 +114,7 @@ def generate(
|
||||
payload_is_base64: bool = True,
|
||||
start_parsing_at: int = 1,
|
||||
field_sep: str = ',',
|
||||
post_init: str = '',
|
||||
) -> str:
|
||||
type_map = resolve_keys(keymap)
|
||||
keys_enum = enum(keymap)
|
||||
@@ -164,6 +165,7 @@ static inline void
|
||||
enum PARSER_STATES {{ KEY, EQUAL, UINT, INT, FLAG, AFTER_VALUE {payload} }};
|
||||
enum PARSER_STATES state = KEY, value_state = FLAG;
|
||||
{command_class} g = {{0}};
|
||||
{post_init}
|
||||
unsigned int i, code;
|
||||
uint64_t lcode; int64_t accumulator;
|
||||
bool is_negative; (void)is_negative;
|
||||
@@ -343,7 +345,7 @@ def parsers() -> None:
|
||||
}
|
||||
text = generate(
|
||||
'parse_dnd_code', 'screen_handle_dnd_command', 'dnd_command', keymap, 'DnDCommand',
|
||||
payload_is_base64=False, start_parsing_at=0, field_sep=':')
|
||||
payload_is_base64=False, start_parsing_at=0, field_sep=':', post_init='g.cell_y = -1;')
|
||||
write_header(text, 'kitty/parse-dnd-command.h')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user