mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 08:26:56 +00:00
Ring bell when goto_session -1 has no history
This commit is contained in:
parent
8dac15b8b2
commit
3087cbdcec
1 changed files with 5 additions and 1 deletions
|
|
@ -13,7 +13,7 @@ from typing import TYPE_CHECKING, Any, Optional, Sequence, Union
|
|||
|
||||
from .cli_stub import CLIOptions, SaveAsSessionOptions
|
||||
from .constants import config_dir, unserialize_launch_flag
|
||||
from .fast_data_types import get_options
|
||||
from .fast_data_types import get_options, ring_bell
|
||||
from .layout.interface import all_layouts
|
||||
from .options.types import Options
|
||||
from .options.utils import resize_window, to_layout_names, window_size
|
||||
|
|
@ -462,9 +462,13 @@ def goto_session(boss: BossType, cmdline: Sequence[str]) -> None:
|
|||
nidx = max(0, len(goto_session_history) - 1 - idx)
|
||||
if nidx < len(goto_session_history):
|
||||
switch_to_session(boss, goto_session_history[nidx])
|
||||
return
|
||||
else:
|
||||
if goto_session_history:
|
||||
switch_to_session(boss, goto_session_history[-1])
|
||||
return
|
||||
if get_options().enable_audio_bell:
|
||||
ring_bell(getattr(boss.active_tab_manager, 'os_window_id', 0))
|
||||
return
|
||||
else:
|
||||
for x in cmdline:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue