Comments (11)
Hmm, it should work without BufEnter.
- What version of Vim (+ patch level) do you use?
- What VCS?
- Did you set any signify options?
from vim-signify.
- Vim 7.3 patch 918
- git
- no
I tried just with signify enabled and it works, there must be some ohter plugin that is interfarring it. Though, it would be no harm to call it on the BufEnter, wouldn't it?
from vim-signify.
Well, BufEnter will be triggered every time you change between windows even when there were no changes.
Therefore the signify_update_on_bufenter
option was introduced. See :help signify-options
from vim-signify.
Yeah, right, I have that option enabled, but no lucky.
from vim-signify.
Well, it only works if the something was modified in Vim already. :echo &modified
has to be 1. Then the buffer would be written and &modified would be 0 again. That prevents unneeded sign updating between switching windows.
And since it should work, you probably have to find the faulty plugin.
from vim-signify.
It is acctually your plugin that is faulty, you should use 'b:path' instead of 's:path'.
The problem I am encoutering is that after signify set the signs, a new window with a 'unlisted' buffer is created in which your 'BufDelete' is triggered in which script wide variable 's:path' is reset which cause the signs are removed globally. 'b:path' will fix this problem though, it is just a quick fix, I havn't digging deeper into your code, there might be a better true fix though. Just want to point the problem out to you.
from vim-signify.
Ah, I see. A racing problem.
Try replacing the code for BufDelete in plugin/signify.vim by this:
autocmd BufDelete *
\ let path = resolve(expand('<afile>:p')) |
\ call s:stop(path) |
\ if has_key(s:sy, path) |
\ call remove(s:sy, path) |
\ endif
Does this help?
from vim-signify.
Noop, still not.
By the way, it is minibufexpl.vim plugin that signify do not cooprate well with. The code related to this problem in minibufexpl.vim is https://github.com/fholgado/minibufexpl.vim/blob/v6.5.2/plugin/minibufexpl.vim#L1028, with this line commented out, everthing works, but this code is acctually necessary. 'set nobuflisted' will trigger your 'BufDelete' in a nested autocmd, this is the problem.
from vim-signify.
You can reproduce this problem by the following steps:
git clone https://github.com/yegle/vim-reset
source vim-reset/activate
mkdir ~/.vim/.develop
touch ~/.vim/.develop/_vimrc
echo "let g:miniBufExplAutoStart = 1" >> ~/.vim/.develop/_vimrc
echo "let g:miniBufExplBuffersNeeded = 0" >>~/.vim/.develop/_vimrc
vim-reset --hard --confdir ~/.vim/.develop --add-rtp ~/.vim/bundle/plugin-signify/ --add-rtp ~/.vim/bundle/plugin-minibufexpl/
- open a git tracked modified file, you will see the problem.
vim-reset is a script that I contributed and rewritten almost all lines to set up a sandbox vim environment for plugin testing and development.
from vim-signify.
Acctually after a small change to your patch, it woks, it probobly a typo of yours
autocmd BufDelete *
\ let path = resolve(expand('<afile>:p')) |
\ call s:stop(path) | "use path here not s:path
\ if has_key(s:sy, path) |
\ call remove(s:sy, path) |
\ endif
from vim-signify.
Yup, I corrected the typo just after I posted it. :-)
Cool, I'll merge this into master then.
Thanks for noticing and the helping feedback!
from vim-signify.
Related Issues (20)
- Show git changes by colour HOT 1
- Visual bug HOT 1
- Jump to a line number without counting uncommited lines HOT 1
- For some files, the ~ symbol will always be displayed HOT 2
- Is it possible to color the line number instead of a sign? HOT 2
- Custom `numhl` highlightings are ignored HOT 2
- Vim-signify does not work. HOT 5
- Get "Undefined variable: g:signify_detecting" error when I start vim. HOT 1
- signify creates infinite highlight groups HOT 3
- Sign Blocks and lua file
- [Feature Request] Window borders for SignifyHunkDiff
- Support for DesignSync (dssc) version control system HOT 1
- documentation for legacy branch
- open all folds on disable signify folds
- Support environment variables in diff commands HOT 1
- `List index out of range` caused by missing priority in `sign place` output
- Error when opening hunk diff floating window on neovim HOT 1
- `Key not present in Dictionary` errors when using `g:signify_vcs_cmds` HOT 2
- fossil: -c 0 currently (<=fossil-2.23) does not work as expected (uses default number of context lines) HOT 1
- Remove trailing white spaces on the changed lines HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-signify.