Cleanup previous PR
The reason maxsplit is 1 is because some layout action in the future may need more sophisticated args processing, for example, shlex.split() instead of plain split(), or even a full command line parser.
This commit is contained in:
parent
93694925ce
commit
2a5922ce92
2 changed files with 5 additions and 6 deletions
|
|
@ -63,6 +63,9 @@ Detailed list of changes
|
|||
- Add a mappable action to toggle the mirrored setting for the tall and fat
|
||||
layouts (:pull:`5344`)
|
||||
|
||||
- Add a mappable action to switch between predefined bias values for the tall and fat
|
||||
layouts (:pull:`5352`)
|
||||
|
||||
- Wayland: Reduce flicker at startup by not using render frames immediately after a resize (:iss:`5235`)
|
||||
|
||||
- Linux: Update cursor position after all key presses not just pre-edit text
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ def neighbors_for_tall_window(
|
|||
|
||||
|
||||
class TallLayoutOpts(LayoutOpts):
|
||||
bias: 50
|
||||
bias: int = 50
|
||||
full_size: int = 1
|
||||
mirrored: bool = False
|
||||
|
||||
|
|
@ -78,6 +78,7 @@ def build_bias_list(self) -> Tuple[float, ...]:
|
|||
b = max(0.1, min(b, 0.9))
|
||||
return tuple(repeat(b / self.full_size, self.full_size)) + (1.0 - b,)
|
||||
|
||||
|
||||
class Tall(Layout):
|
||||
|
||||
name = 'tall'
|
||||
|
|
@ -220,11 +221,6 @@ def layout_action(self, action_name: str, args: Sequence[str], all_windows: Wind
|
|||
if action_name == 'bias':
|
||||
if len(args) == 0:
|
||||
raise ValueError('layout_action bias must contain at least one number between 10 and 90')
|
||||
# Because kitty/options/utils.py:312 sets maxsplit=1, line 315 will always
|
||||
# pass args as a tuple consisting of at most 1 element with all the args despite
|
||||
# it implying the tuple could have more than one element with via [1:]
|
||||
# In case this is by design and I'm missing the reason, have to split out
|
||||
# the rest of the args:
|
||||
biases = args[0].split()
|
||||
if len(biases) == 1:
|
||||
biases.append("50")
|
||||
|
|
|
|||
Loading…
Reference in a new issue