mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-27 03:42:49 +00:00
More work on transfer kitten
This commit is contained in:
parent
4b074d723e
commit
d2809a0acb
2 changed files with 7 additions and 3 deletions
|
|
@ -405,7 +405,7 @@ class Send(Handler):
|
|||
self.cmd.styled('Permission granted for this transfer', fg='green')
|
||||
self.print()
|
||||
self.send_file_metadata()
|
||||
self.loop_tick()
|
||||
self.asyncio_loop.call_soon(self.loop_tick)
|
||||
|
||||
def start_transfer(self) -> None:
|
||||
if self.manager.active_file is None:
|
||||
|
|
|
|||
|
|
@ -23,12 +23,16 @@ def safe_divide(numerator: Union[int, float], denominator: Union[int, float], ze
|
|||
|
||||
|
||||
def reduce_to_single_grapheme(text: str) -> str:
|
||||
limit = len(text)
|
||||
if limit < 2:
|
||||
return text
|
||||
x = 1
|
||||
while True:
|
||||
while x < limit:
|
||||
pos = truncate_point_for_length(text, x)
|
||||
if pos > 0:
|
||||
return text[:pos]
|
||||
pos += 1
|
||||
x += 1
|
||||
return text
|
||||
|
||||
|
||||
def render_path_in_width(path: str, width: int) -> str:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue