Skip to content

Add CoqCommandComplete and g:coqtail#event - #368

Draft
whonore wants to merge 1 commit into
mainfrom
checked-region-autocmd
Draft

Add CoqCommandComplete and g:coqtail#event#368
whonore wants to merge 1 commit into
mainfrom
checked-region-autocmd

Conversation

@whonore

@whonore whonore commented Aug 31, 2024

Copy link
Copy Markdown
Owner

Fixes #367.

@whonore

whonore commented Aug 31, 2024

Copy link
Copy Markdown
Owner Author

@katrinafyi could you see if the approach described in the docs here does what you want?

@katrinafyi

Copy link
Copy Markdown

I'll give it a try today, thanks!

@katrinafyi

Copy link
Copy Markdown

Thanks for working on this!

Using the autocmd in the documentation seems to hang the editor. Is there a cycle with CoqJumpToEnd triggering it again?

I tried this and it did not seem to fix the problem, but my Vimscript is not good:

let g:coqautocommanding = v:false
augroup CoqtailFollowChecked
autocmd!
autocmd! User CoqCommandComplete
\  if ! g:coqautocommanding && g:coqtail#event.cmd =~# 'step\|rewind\|to_line\|to_top'
\|   let g:coqautocommanding = v:true
\|   CoqJumpToEnd
\|   let g:coqautocommanding = v:false
\| endif
augroup END

I can confirm that the autocmd works if I replace the CoqJumpToEnd with a simple echo.

@whonore

whonore commented Sep 1, 2024

Copy link
Copy Markdown
Owner Author

Ah, I bet it's the same root problem as #360. I was able to work around it then but I guess I'll have to figure out how to actually solve it. In the meantime, it works for me at least using Vim instead of NeoVim.

@whonore
whonore marked this pull request as draft September 4, 2024 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature: automatic CoqJumpToEnd after stepping?

2 participants