@@ -199,7 +199,7 @@ def current_editor_buffer(self):
199199 Return the `EditorBuffer` that is currently active.
200200 """
201201 # For each buffer name on the focus stack.
202- for current_buffer_name in [ self .cli .current_buffer_name , self . cli . focus_stack . previous ] :
202+ for current_buffer_name in self .cli .buffers . focus_stack :
203203 if current_buffer_name is not None :
204204 # Find/return the EditorBuffer with this name.
205205 for b in self .window_arrangement .editor_buffers :
@@ -241,8 +241,8 @@ def sync_with_prompt_toolkit(self):
241241
242242 # Make sure that the focus stack of prompt-toolkit has the current
243243 # page.
244- self .cli .focus_stack . _stack = [
245- self .window_arrangement .active_editor_buffer .buffer_name ]
244+ self .cli .focus (
245+ self .window_arrangement .active_editor_buffer .buffer_name )
246246
247247 def _current_buffer_changed (self , cli ):
248248 """
@@ -316,7 +316,7 @@ def enter_command_mode(self):
316316 """
317317 Go into command mode.
318318 """
319- self .cli .focus_stack . push (COMMAND_BUFFER )
319+ self .cli .push_focus (COMMAND_BUFFER )
320320 self .key_bindings_manager .get_vi_state (self .cli ).input_mode = InputMode .INSERT
321321
322322 self .previewer .save ()
@@ -327,7 +327,7 @@ def leave_command_mode(self, append_to_history=False):
327327 """
328328 self .previewer .restore ()
329329
330- self .cli .focus_stack . pop ()
330+ self .cli .pop_focus ()
331331 self .key_bindings_manager .get_vi_state (self .cli ).input_mode = InputMode .NAVIGATION
332332
333333 self .cli .buffers [COMMAND_BUFFER ].reset (append_to_history = append_to_history )
0 commit comments