mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-14 04:24:52 +02:00
unicode_input kitten: Add an option to specify the startup tab
Fixes #6552
This commit is contained in:
@@ -555,14 +555,25 @@ func run_loop(opts *Options) (lp *loop.Loop, err error) {
|
||||
defer cv.Save()
|
||||
|
||||
h := handler{recent: cached_data.Recent, lp: lp, emoji_variation: opts.EmojiVariation}
|
||||
switch cached_data.Mode {
|
||||
case "HEX":
|
||||
switch opts.Tab {
|
||||
case "previous":
|
||||
switch cached_data.Mode {
|
||||
case "HEX":
|
||||
h.mode = HEX
|
||||
case "NAME":
|
||||
h.mode = NAME
|
||||
case "EMOTICONS":
|
||||
h.mode = EMOTICONS
|
||||
case "FAVORITES":
|
||||
h.mode = FAVORITES
|
||||
}
|
||||
case "code":
|
||||
h.mode = HEX
|
||||
case "NAME":
|
||||
case "name":
|
||||
h.mode = NAME
|
||||
case "EMOTICONS":
|
||||
case "emoticons":
|
||||
h.mode = EMOTICONS
|
||||
case "FAVORITES":
|
||||
case "favorites":
|
||||
h.mode = FAVORITES
|
||||
}
|
||||
all_modes[0] = ModeData{mode: HEX, title: "Code", key: "F1"}
|
||||
|
||||
@@ -18,6 +18,13 @@ Whether to use the textual or the graphical form for emoji. By default the
|
||||
default form specified in the Unicode standard for the symbol is used.
|
||||
|
||||
|
||||
--tab
|
||||
type=choices
|
||||
default=previous
|
||||
choices=previous,code,name,emoticons,favorites
|
||||
The initial tab to display. Defaults to using the tab from the previous kitten invocation.
|
||||
|
||||
|
||||
'''.format
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user