@@ -50,7 +50,7 @@ Class representing a text color rendering rule
5050### __ init__
5151
5252``` python
53- def __init__ (self , regex , color , rule_type , match_type , region , include_whitespace , logger )
53+ def __init__ (self , regex , color , selected_color , rule_type , match_type , region , include_whitespace , logger )
5454```
5555
5656Constructor for ColorRule object
@@ -64,6 +64,7 @@ Constructor for ColorRule object
6464-----|----------|-----
6565 regex | str | A python 're' module string
6666 color | int | A valid color value. Ex. py_cui.WHITE_ON_BLACK
67+ selected_color | int | Color to use if rule matched but selected modifier is applied
6768 rule_type | str | String representing rule type. [ 'startswith', 'endswith', 'notstartswith', 'notendswith', 'contains']
6869 match_type | str | String representing the match type. [ 'line', 'regex', 'region']
6970 region | [ int, int] | Start and end positions for the coloring, None if match_type != 'region'
@@ -103,7 +104,7 @@ Checks if the color rule matches a line
103104### _ generate_fragments_regex
104105
105106``` python
106- def _generate_fragments_regex (self , widget , render_text )
107+ def _generate_fragments_regex (self , widget , render_text , selected )
107108```
108109
109110Splits text into fragments based on regular expression
@@ -131,7 +132,7 @@ Splits text into fragments based on regular expression
131132### _ split_text_on_region
132133
133134``` python
134- def _split_text_on_region (self , widget , render_text )
135+ def _split_text_on_region (self , widget , render_text , selected )
135136```
136137
137138Splits text into fragments based on region
@@ -159,7 +160,7 @@ Splits text into fragments based on region
159160### generate_fragments
160161
161162``` python
162- def generate_fragments (self , widget , line , render_text )
163+ def generate_fragments (self , widget , line , render_text , selected = False )
163164```
164165
165166Splits text into fragments if matched line to regex
0 commit comments