unicode_input kitten: Add an option to specify the startup tab
Fixes #6552
This commit is contained in:
parent
f299549dba
commit
670ad353b2
3 changed files with 25 additions and 5 deletions
|
|
@ -51,6 +51,8 @@ Detailed list of changes
|
|||
|
||||
- Remote control: Allow using a random TCP port as the remote control socket and also allow using TCP sockets in :opt:`listen_on`
|
||||
|
||||
- unicode_input kitten: Add an option to specify the startup tab (:iss:`6552`)
|
||||
|
||||
- X11: Print an error to :file:`STDERR` instead of refusing to start when the user sets a custom window icon larger than 128x128 (:iss:`6507`)
|
||||
|
||||
0.29.2 [2023-07-27]
|
||||
|
|
|
|||
|
|
@ -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 @@
|
|||
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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue