peco/peco — pull request #132 by k0kubun (2014-07-03 16:50:06+00:00)
Title: Introduce matched style

## current behavior differences
It seems that `Query` style behavior is different in percol and peco.
https://github.com/peco/peco/pull/131 may be related to this PR.

#### peco
```json
{
"Style": {
"Basic": ["on_black", "white"],
"Selected": ["on_cyan", "blue"],
"Query": ["on_yellow", "green", "bold"]
}
}
```

![](http://i.gyazo.com/45eff691457f983e02866e2dbfe20257.png)

#### percol
```python
percol.view.CANDIDATES_LINE_BASIC = ("on_default", "white")
percol.view.CANDIDATES_LINE_SELECTED = ("on_cyan", "blue")
percol.view.CANDIDATES_LINE_QUERY = ("on_yellow", "green", "bold")
```

![](http://i.gyazo.com/7c9a2bf673e9f047dd6fdc91e448d56c.png)

## my idea
I think percol's `percol.view.CANDIDATES_LINE_QUERY` is not for query line but for matched word.
Naming matched word as query is ambiguous, and coloring query line is nice.
Thus https://github.com/peco/peco/pull/131 looks good to me.

But I want to highlight matched word independently.
So I added new style configuration, `Matched`.
It behaves like percol's `percol.view.CANDIDATES_LINE_QUERY`.

## demo

```json
{
"Style": {
"Basic": ["on_default", "default"],
"Selected": ["on_cyan", "black"],
"Query": ["on_red", "magenta"],
"Matched": ["on_yellow", "green", "bold"]
}
}
```

![](http://i.gyazo.com/4016a53a295249ca1c1df273f9652912.png)