Skip to content

Commit 00d2cad

Browse files
Use Application.style attribute instead of get_style. (Change for the latest prompt_toolkit.)
1 parent 34bdd9b commit 00d2cad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pyvim/editor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from prompt_toolkit.key_binding.vi_state import InputMode
1919
from prompt_toolkit.shortcuts import create_eventloop
2020
from prompt_toolkit.utils import Callback
21+
from prompt_toolkit.styles import DynamicStyle, PygmentsStyle
2122

2223
from .commands.completer import create_command_completer
2324
from .commands.handler import handle_command
@@ -171,7 +172,7 @@ def handle_action(cli, buffer):
171172
COMMAND_BUFFER: command_buffer,
172173
SEARCH_BUFFER: search_buffer,
173174
},
174-
get_style=lambda: self.current_style,
175+
style=DynamicStyle(lambda: PygmentsStyle(self.current_style)),
175176
paste_mode=Condition(lambda cli: self.paste_mode),
176177
ignore_case=Condition(lambda cli: self.ignore_case),
177178
mouse_support=Condition(lambda cli: self.enable_mouse_support),

0 commit comments

Comments
 (0)