Skip to content

Revert "bugfix: application current buffer as editor current_buffer" #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion pyvim/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,13 @@ def current_editor_buffer(self):
"""
Return the `EditorBuffer` that is currently active.
"""
return self.application.current_buffer
# For each buffer name on the focus stack.
for current_buffer_name in self.application.buffers.focus_stack:
if current_buffer_name is not None:
# Find/return the EditorBuffer with this name.
for b in self.window_arrangement.editor_buffers:
if b.buffer_name == current_buffer_name:
return b

@property
def add_key_binding(self):
Expand Down