Skip to content

Commit

Permalink
save location (file name)
Browse files Browse the repository at this point in the history
  • Loading branch information
nakagami committed Aug 12, 2024
1 parent e194271 commit 7a6e2d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 3 additions & 1 deletion pyvim/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ def __init__(self, config_directory='~/.pyvim', input=None, output=None):
self.cursorline = False # ':set cursorline'
self.cursorcolumn = False # ':set cursorcolumn'
self.colorcolumn = [] # ':set colorcolumn'. List of integers.

# locations in command argument
self.locations = []
self.current_location_index = 0
# open file history
self.location_history = []

# Ensure config directory exists.
self.config_directory = os.path.abspath(os.path.expanduser(config_directory))
Expand Down
5 changes: 2 additions & 3 deletions pyvim/window_arrangement.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,8 @@ def _get_or_create_editor_buffer(self, location=None, text=None):
self._add_editor_buffer(eb)

return eb
else:
# Found! Return it.
return eb
self.editor.location_history.append(location)
return eb

def open_buffer(self, location=None, show_in_current_window=False):
"""
Expand Down

0 comments on commit 7a6e2d4

Please sign in to comment.