Use a tuple for clipboard control

Avoids churn in the generated options files as python randomized set
ordering
This commit is contained in:
Kovid Goyal
2021-06-04 05:36:05 +05:30
parent 79dd98b20e
commit c52a04c7d3
2 changed files with 4 additions and 5 deletions

View File

@@ -451,7 +451,7 @@ class Options:
box_drawing_scale: typing.Tuple[float, float, float, float] = (0.001, 1.0, 1.5, 2.0)
clear_all_shortcuts: bool = False
click_interval: float = -1.0
clipboard_control: typing.FrozenSet[str] = frozenset({'write-clipboard', 'write-primary'})
clipboard_control: typing.Tuple[str, ...] = ('write-clipboard', 'write-primary')
close_on_child_death: bool = False
@property

View File

@@ -7,8 +7,7 @@ import os
import re
import sys
from typing import (
Any, Callable, Dict, FrozenSet, Iterable, List, Optional, Sequence, Tuple,
Union
Any, Callable, Dict, Iterable, List, Optional, Sequence, Tuple, Union
)
import kitty.fast_data_types as defines
@@ -630,8 +629,8 @@ def allow_remote_control(x: str) -> str:
return x
def clipboard_control(x: str) -> FrozenSet[str]:
return frozenset(x.lower().split())
def clipboard_control(x: str) -> Tuple[str, ...]:
return tuple(x.lower().split())
def allow_hyperlinks(x: str) -> int: