Skip to content

Commit 573c064

Browse files
cosvenjonathanslenders
authored andcommitted
Fix Editor.current_editor buffer (for prompt_toolkit 2.0).
Return application current buffer as editor current_buffer.
1 parent e6bda37 commit 573c064

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

pyvim/editor.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,7 @@ def current_editor_buffer(self):
191191
"""
192192
Return the `EditorBuffer` that is currently active.
193193
"""
194-
# For each buffer name on the focus stack.
195-
for current_buffer_name in self.application.buffers.focus_stack:
196-
if current_buffer_name is not None:
197-
# Find/return the EditorBuffer with this name.
198-
for b in self.window_arrangement.editor_buffers:
199-
if b.buffer_name == current_buffer_name:
200-
return b
194+
return self.application.current_buffer
201195

202196
@property
203197
def add_key_binding(self):

0 commit comments

Comments
 (0)