(args []interface{})
| 416 | } |
| 417 | |
| 418 | func (s *Screen) highlightSet(args []interface{}) { |
| 419 | for _, arg := range args { |
| 420 | hl := arg.([]interface{})[0].(map[string]interface{}) |
| 421 | _, ok := hl["reverse"] |
| 422 | if ok { |
| 423 | highlight := Highlight{} |
| 424 | highlight.foreground = s.highlight.background |
| 425 | highlight.background = s.highlight.foreground |
| 426 | s.highlight = highlight |
| 427 | continue |
| 428 | } |
| 429 | |
| 430 | highlight := Highlight{} |
| 431 | fg, ok := hl["foreground"] |
| 432 | if ok { |
| 433 | rgba := calcColor(reflectToInt(fg)) |
| 434 | highlight.foreground = rgba |
| 435 | } else { |
| 436 | highlight.foreground = s.ws.foreground |
| 437 | } |
| 438 | |
| 439 | bg, ok := hl["background"] |
| 440 | if ok { |
| 441 | rgba := calcColor(reflectToInt(bg)) |
| 442 | highlight.background = rgba |
| 443 | } else { |
| 444 | highlight.background = s.ws.background |
| 445 | } |
| 446 | s.highlight = highlight |
| 447 | } |
| 448 | } |
| 449 | |
| 450 | func (s *Screen) setScrollRegion(args []interface{}) { |
| 451 | arg := args[0].([]interface{}) |
no test coverage detected