mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
add minimap linestate for codeedit to disable minimap (#402)
This commit is contained in:
@@ -89,6 +89,7 @@ const (
|
||||
KwArgState = "state"
|
||||
KwArgTemplate = "template"
|
||||
KwArgLang = "lang"
|
||||
KwArgMinimap = "minimap"
|
||||
)
|
||||
|
||||
var ColorNames = []string{"yellow", "blue", "pink", "mint", "cyan", "violet", "orange", "green", "red", "white"}
|
||||
@@ -4759,6 +4760,9 @@ func CodeEditCommand(ctx context.Context, pk *scpacket.FeCommandPacketType) (scb
|
||||
if langArg != "" {
|
||||
lineState[sstore.LineState_Lang] = langArg
|
||||
}
|
||||
if _, ok := pk.Kwargs[KwArgMinimap]; ok {
|
||||
lineState[sstore.LineState_Minimap] = resolveBool(pk.Kwargs[KwArgMinimap], false)
|
||||
}
|
||||
update, err := addLineForCmd(ctx, "/"+GetCmdStr(pk), true, ids, cmd, "code", lineState)
|
||||
if err != nil {
|
||||
// TODO tricky error since the command was a success, but we can't show the output
|
||||
|
||||
Reference in New Issue
Block a user