...
This commit is contained in:
21
kitty/cli.py
21
kitty/cli.py
@@ -66,17 +66,17 @@ Path to a file containing the startup |_ session| (tabs, windows, layout, progra
|
|||||||
|
|
||||||
--single-instance -1
|
--single-instance -1
|
||||||
type=bool-set
|
type=bool-set
|
||||||
If specified only a single instance of {appname} will run. New invocations will
|
If specified only a single instance of |_ {appname}| will run. New invocations will
|
||||||
instead create a new top-level window in the existing {appname} instance. This
|
instead create a new top-level window in the existing |_ {appname}| instance. This
|
||||||
allows {appname} to share a single sprite cache on the GPU and also reduces
|
allows |_ {appname}| to share a single sprite cache on the GPU and also reduces
|
||||||
startup time. You can also have separate groups of {appname} instances by using the
|
startup time. You can also have separate groups of |_ {appname}| instances by using the
|
||||||
|_ --instance-group| option
|
|_ --instance-group| option
|
||||||
|
|
||||||
|
|
||||||
--instance-group
|
--instance-group
|
||||||
Used in combination with the |_ --single-instance| option. All {appname} invocations
|
Used in combination with the |_ --single-instance| option. All |_ {appname}| invocations
|
||||||
with the same |_ --instance-group| will result in new windows being created
|
with the same |_ --instance-group| will result in new windows being created
|
||||||
in the first {appname} instance with that group
|
in the first |_ {appname}| instance within that group
|
||||||
|
|
||||||
|
|
||||||
# Debugging options
|
# Debugging options
|
||||||
@@ -214,7 +214,7 @@ def version():
|
|||||||
def wrap(text, limit=80):
|
def wrap(text, limit=80):
|
||||||
NORMAL, IN_FORMAT = 'NORMAL', 'IN_FORMAT'
|
NORMAL, IN_FORMAT = 'NORMAL', 'IN_FORMAT'
|
||||||
state = NORMAL
|
state = NORMAL
|
||||||
spaces = []
|
last_space_at = None
|
||||||
chars_in_line = 0
|
chars_in_line = 0
|
||||||
breaks = []
|
breaks = []
|
||||||
for i, ch in enumerate(text):
|
for i, ch in enumerate(text):
|
||||||
@@ -226,12 +226,13 @@ def wrap(text, limit=80):
|
|||||||
state = IN_FORMAT
|
state = IN_FORMAT
|
||||||
continue
|
continue
|
||||||
if ch == ' ':
|
if ch == ' ':
|
||||||
spaces.append(i)
|
last_space_at = i
|
||||||
if chars_in_line < limit:
|
if chars_in_line < limit:
|
||||||
chars_in_line += 1
|
chars_in_line += 1
|
||||||
continue
|
continue
|
||||||
if spaces:
|
if last_space_at is not None:
|
||||||
breaks.append(spaces.pop())
|
breaks.append(last_space_at)
|
||||||
|
last_space_at = None
|
||||||
chars_in_line = i - breaks[-1]
|
chars_in_line = i - breaks[-1]
|
||||||
|
|
||||||
lines = []
|
lines = []
|
||||||
|
|||||||
Reference in New Issue
Block a user