tagbar icon indicating copy to clipboard operation
tagbar copied to clipboard

Unexpected behavior of preview window

Open gmelodie opened this issue 5 years ago • 0 comments

While looking for a solution for #400 (related to #184) I ran across a couple other strange behaviors of the preview window:

  • [ ] 1. Unexpected autoclose and autopreview
    • If both tagbar_autoclose and tagbar_autopreview are turned on, preview window does not close upon tag selection (unexpected)
    • If tagbar_autoclose is turned off and tagbar_autopreview is turned on, preview is closed (expected)
  • [ ] 2. Toggle preview window. Pressing P in a selected tag shows the preview window, but pressing it again doesn't close the preview window (I would expect that)
  • [ ] 3. pclose is used on autoload/tagbar.vim but it doesn't seem to be defined

Suggestions

  1. Create two wrappers for the CloseWindow function: ClosePreviewWindow and OpenPreviewWindow
  2. Create a TogglePreviewWindow that would wrap on top of ClosePreviewWindow and OpenPreviewWindow and map to the P key

Obs: @alerque could you review these ideas and give me some directions on how to go about this? I've been stuck all day trying to solve #400 but the code kept behaving strangely (for instance it seems that pclose doesn't actually close the preview window). I also couldn't find "contributing" or "development" help sections on the repo.

gmelodie avatar Jun 14 '20 16:06 gmelodie