liuchengxu / vista.vim

:cactus: Viewer & Finder for LSP symbols and tags
https://liuchengxu.github.io/vista.vim
MIT License
1.88k stars 89 forks source link

Vista sidebar jumps to first line on jumping back to first line #430

Closed alkim0 closed 1 year ago

alkim0 commented 2 years ago

First, thanks for the excellent plugin.

Describe the bug

When I'm in the Vista sidebar, and I use either <c-w>w or :Vista focus to jump back to the source, the Vista sidebar resets and scrolls back to the top of the sidebar. I expect it to not change.

Environment:

Vista info

    Current FileType: 
Avaliable Executives: ['coc', 'ctags']
    Global Variables:
    let g:vista = {'get_tagline_under_cursor': function('82'), 'winnr': function('80'), 'source': {'fname': '', 'bufnr': 1, 'get_winid': function('84'), 'winid': 1000, 'winnr': 1, 'extension': function('89'), 'line': function('87'), 'get_winnr': function('83'), 'filetype': function('85'), 'lines': function('86'), 'line_trimmed': function('88'), 'scope_seperator': function('90'), 'fpath': ''}, 'winid': function('81'), 'tmps': []}
    let g:vista#executives = ['ale', 'coc', 'ctags', 'lcn', 'nvim_lsp', 'vim_lsc', 'vim_lsp']
    let g:vista#extensions = ['markdown', 'rst']
    let g:vista#finders = ['clap', 'fzf', 'skim']
    let g:vista_blink = [2, 100]
    let g:vista_close_on_fzf_select = 0
    let g:vista_close_on_jump = 0
    let g:vista_cursor_delay = 400
    let g:vista_default_executive = 'ctags'
    let g:vista_disable_statusline = 0
    let g:vista_echo_cursor = 1
    let g:vista_enable_centering_jump = 1
    let g:vista_executive_for = {}
    let g:vista_find_absolute_nearest_method_or_function = 0
    let g:vista_find_nearest_method_or_function_delay = 300
    let g:vista_fold_toggle_icons = ['▼', '▶']
    let g:vista_fzf_preview = []
    let g:vista_icon_indent = ['└ ', '│ ']
    let g:vista_ignore_kinds = []
    let g:vista_no_mappings = 0
    let g:vista_sidebar_position = 'vertical botright'
    let g:vista_sidebar_width = 30
    let g:vista_stay_on_open = 1
    let g:vista_top_level_blink = [2, 100]
    let g:vista_update_on_text_changed = 0
    let g:vista_update_on_text_changed_delay = 500

Steps to reproduce given the above info

  1. Open a file.
  2. Open Vista sidebar (:Vista)
  3. Go to the sidebar, and down x lines.
  4. Change window by using <c-w>w or :Vista focus.

Expected behavior Nothing should happen to the Vista sidebar

Actual behavior Vista sidebar resets to top.

Screenshot or gif (if possible) If applicable, add screenshots to help explain your problem.

https://user-images.githubusercontent.com/9775404/179090210-b944d044-b356-4fe1-8ee0-552daebfb8b6.mp4

liuchengxu commented 1 year ago

Closed by #431