matsui54 / ddc-source-buffer

Buffer source for ddc.vim
MIT License
33 stars 8 forks source link

Move to bottom on save #6

Closed ippachi closed 3 years ago

ippachi commented 3 years ago

Version

NVIM v0.6.0-dev+313-g490e09c6d
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by ippachi@ippachi-MacBook-Air.local

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/HEAD-490e09c/share/nvim"

Run :checkhealth for more info

Minimal vimrc

set rtp+=~/.cache/dein/repos/github.com/vim-denops/denops.vim
set rtp+=~/.cache/dein/repos/github.com/Shougo/ddc.vim
set rtp+=~/.cache/dein/repos/github.com/matsui54/ddc-buffer

call ddc#custom#patch_global('sources', ['buffer'])
call ddc#enable()

Description

When save, it does like Gzt (vim normal command).

Reproduction

  1. Open buffer
  2. Type something.
  3. G or Gk
  4. :w

Sometimes happens, but sometimes it doesn't happen.

Screenshot

CleanShot 2021-09-22 at 20 15 01

matsui54 commented 3 years ago

Thanks for reporting, but I couldn't reproduce the problem. Since ddc-buffer uses BufWritePost, the problem may be related to ddc-buffer...

matsui54 commented 3 years ago

Did you check with other sources?

ippachi commented 3 years ago

Thank you for your quick response.

Did you check with other sources?

Other sources don't reproduce in my environment.

It doesn't seems to happen all file. For example it happens on https://github.com/rails/rails/blob/main/activerecord/lib/arel.rb it doesn't happen on https://github.com/matsui54/ddc-buffer/blob/main/denops/%40ddc-sources/buffer.ts

ippachi commented 3 years ago

And my reproduce step is bad. (either way it doesn't happen on all files.) Correctly

  1. Open buffer
  2. Into insert mode and type something that shows up complecation.
  3. Back to normal mode
  4. G or Gk
  5. :w
matsui54 commented 3 years ago

Oh, I could reproduce in arel.rb. Investing the reason.

matsui54 commented 3 years ago

This may be ddc's problem. I created issue.

ippachi commented 3 years ago

Thank you!! 😊

matsui54 commented 3 years ago

The problem is fixed. Please update ddc.vim.

ippachi commented 3 years ago

It works. Thank you very much!!