mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-26 02:41:54 +00:00
Also output data length in FTC repr
This commit is contained in:
parent
bd231eaf39
commit
c842dece17
1 changed files with 3 additions and 0 deletions
|
|
@ -275,6 +275,8 @@ class FileTransmissionCommand:
|
|||
val = getattr(self, k.name)
|
||||
if val != k.default:
|
||||
ans.append(f'{k.name}={val!r}')
|
||||
if self.data:
|
||||
ans.append(f'data={len(self.data)} bytes')
|
||||
return 'FTC(' + ', '.join(ans) + ')'
|
||||
|
||||
def asdict(self, keep_defaults: bool = False) -> Dict[str, Union[str, int, bytes]]:
|
||||
|
|
@ -861,6 +863,7 @@ class FileTransmission:
|
|||
except Exception as e:
|
||||
log_error(f'Failed to parse file transmission command with error: {e}')
|
||||
return
|
||||
# print('from kitten:', cmd)
|
||||
if not cmd.id:
|
||||
log_error('File transmission command without id received, ignoring')
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue