RTagsComplete implements its own navigation history;
|
def history_size(): |
|
global history |
|
|
|
if not history: |
|
return 0 |
|
|
|
return len(history) |
|
|
|
|
|
def pop_history(): |
|
global history |
|
|
|
if not history: |
|
return None |
|
|
|
return history.pop() |
|
|
|
|
|
def push_history(file, line, col): |
|
global history |
|
|
|
if not history: |
|
history = collections.deque( |
|
[], |
|
maxlen=int(settings.get('jump_limit', 10))) |
|
|
|
history.append([file, line, col]) |
|
|
|
|
|
def return_in_history(view): |
|
global history |
|
|
|
if not history_size(): |
|
return |
|
|
|
file, line, col = pop_history() |
|
view.window().open_file( |
|
'%s:%s:%s' % (file, line, col), sublime.ENCODED_POSITION) |
The stack itself should in fact be Sublime's own Default.history_list, enabling the use of the Goto->Jump Back for returning from a RTagsComplete navigation step.
import Default.history_list as history_list
history_list.get_jump_history_for_view(view).push_selection(view)
We might lose the history view though - unsure.
RTagsComplete implements its own navigation history;
RTagsComplete/plugin/vc_manager.py
Lines 124 to 161 in 9db6a36
The stack itself should in fact be Sublime's own
Default.history_list, enabling the use of the Goto->Jump Back for returning from a RTagsComplete navigation step.We might lose the history view though - unsure.