This is only enforced for dynamically created signs, namely
g:signify_sign_delete and g:signify_sign_changedelete, if
g:signify_sign_show_count is on.
References https://github.com/mhinz/vim-signify/issues/105
Having default values for options that depend on another option's value is a bad
practice. Be more explicit:
g:signify_sign_show_text is ON by default
g:signify_sign_show_count is ON by default
So, people who want just background colors and no text at all in their signs
have to set both:
let g:signify_sign_show_text = 0
let g:signify_sign_show_count = 0
Before this change, only the first line was needed.
This also fixes a bug that happened with:
let g:signify_sign_show_text = 0
let g:signify_sign_show_count = 1
Removed lines wouldn't show a count whereas changed + removed lines would.
When you have nested repos of different VCS and you edit a file from the inner
repo, more than one VCS can return a valid diff. Only one VCS should return a
non-empty diff, though.
Once a non-empty diff is found, all other VCS get disabled to reduce overhead.
References #235.
Before this change, it was possible that a buffer was disabled, when Sy was run
more than once at startup, e.g. because of `BufEnter` and `FocusGained`.
The first call would start the detection and the second call would disable the
buffer, because the first call hadn't changed the VCS type from "unknown" yet.
To avoid issues for Vim versions between 7.4.1966 and 7.4.2071, we now use
type() to distinguish between the type of variable `job_id` being either Number
or Job.
Before Vim 8.0.50, an exited job was only detected with a potentially huge
delay.
Thus, for versions smaller than 8.0.50, we add a close_cb callback that runs
job_status() which in return runs the exit_cb callback immeditely if the job was
found to be dead.
Vim patch:
01688ad545
References: #216.
Since we don't switch the window anymore, we can't simply refer to b:sy as we
used to do while Sy worked only synchronously.
Now we provide the buffer number to each job and the exit handler gets a pointer
to the b:sy of that buffer and passes it to all the subsequent functions.
References #209, #210.
Vim provides 2 arguments to the exit handler whereas Neovim always provides 3.
Change function signature to handle an optional third argument, even if it never
gets used.
Fixes#204.
This makes all Signify signs use a non-breaking space as text. This is
convenient if only the background colors of the signs are important.
References #188.
When a user isn't logged in, "accurev diff" will return an exit code of
52. Since the only well defined values are 0 or 1, treat anything else
as unversioned.
"accurev diff" returns 0 for no diff, 1 for differences, and 2 for error
(like not being run from a workspace). Use 2 to indicate the file isn't
being versioned by AccuRev so Sy properly sets the vcs type to AccuRev
for unmodified files.
Previously, when using *nix csh-like (or probably ksh-like) shells, perforce
detection would fail with E484. This was due to hard-coded bash-like
redirection.
This change obeys the vim `shellredir` option when detecting perforce.
Use split() instead of substitute(), since the latter simply parses strings
and doesn't understand the notion of path separators. Backslashes would be
interpreted as beginning escape sequences.
Using split() works around this problem.
Closes#163.
This merge removes g:signify_diffoptions and replaces it by the much more
general g:signify_vcs_commands. Users can customize the entire command to be
run now.
This reverts commit 5cdf72acd1.
`shellescape()`, which is what `sy#util#escape()` is a front-end to, is
only supposed to escape a single element of an argv list. In this case,
it's being used to escape multiple -- `p4 info 2>&1 >`. None of that
should be escaped anyway, because they need to be interpreted by the
shell.