gregsexton / gitv

gitk for Vim.
938 stars 59 forks source link

Error when using O map in browser mode #57

Closed idbrii closed 7 years ago

idbrii commented 11 years ago

I get this error when pressing O on a commit in browser mode:

Error detected while processing function <SNR>69_OpenGitvCommit..<SNR>69_MoveIntoPreviewAndExecute..<SNR>69_AttemptToCreateAPreviewWindow:
line    5:
No preview window detected.

Aside from that error, the commit is correctly opened in a new tab. I'm not sure why it's trying to use a preview window (or what would be in the preview window).

Using CR opens the commit in the right pane without error. So I guess something with the new tab handling is trying and failing to open a preview window.

rvoicilas commented 11 years ago

+1

rvoicilas commented 11 years ago

I went a little deeper into the problem and figured out that the issue is because line 800, where it tries to set the folding method. I don't have the skills to make that configurable; for now I just commented out that line, because really that's what I want ... I want to see the actual diff unfolded. I also commented out locally line 120, for the same reason - I find it more practical to take a quick look at the diff while in browser view then to switch to the commit and unfold each chunk. Ideally, the commits are small enough that it will fit into your screen's height.

It would be really nice if the folding option would be configurable at the plugin level, something similar to what python-mode offers:

let g:gitv_fold_method = "syntax|auto|..."

idbrii commented 11 years ago

@rvoicilas Is that the right bug? The preview window error is because it's setting the folding method?

rvoicilas commented 11 years ago

I was getting exactly the same error you mentioned. The fix for me was to comment out the folding method, so yeah, I think this is the bug.

rbong commented 7 years ago

I believed this was fixed when I removed a case where warnings were always thrown. Please re-open this if you continue to have issues.