liuchengxu / vista.vim

:cactus: Viewer & Finder for LSP symbols and tags

Home Page:https://liuchengxu.github.io/vista.vim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

alkim0 opened this issue · comments

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:

  • OS: ArchLinux
  • Vim/Neovim version:
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Jun 28 2022 16:22:51)
Compiled by Arch Linux
  • This plugin version: f9c8c8a
  • I'm using universal-ctags: Yes
    • Ctags version:
    Universal Ctags 5.9.0(p5.9.20210905.0), Copyright (C) 2015 Universal Ctags Team
    Universal Ctags is derived from Exuberant Ctags.
    Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
    Compiled: Sep  8 2021, 17:51:41
    URL: https://ctags.io/
    Optional compiled features: +wildcards, +regex, +gnulib_regex, +iconv, +option-directory, +xpath, +json, +interactive, +sandbox, +yaml, +packcc, +optscript
    
  • I'm using some LSP client:
    • Related Vim LSP client: coc
    • The Vim LSP client version:
    • Have you tried updated to the latest version of this LSP client: Yes

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.

vista.mp4

Closed by #431