Commit Graph

606 Commits

Author SHA1 Message Date
Marco Hinz
bf099a3fe2
Nvim: provide cwd to jobstart() 2017-02-20 15:14:24 +01:00
Marco Hinz
61d5a48c71
Simplify has-patch condition
The new format is supported since 7.4.237. If a Vim doesn't recognize the
format, it's too old by definition.
2017-02-20 15:03:34 +01:00
Marco Hinz
7a639b0263
Rename callback functions 2017-02-20 14:52:24 +01:00
Marco Hinz
0908e37758
Vim: make sure all stdout is read when job exits
References #228.
2017-02-20 14:47:51 +01:00
Marco Hinz
3020873ee4
Use correct cwd in verbose output 2017-02-20 01:38:25 +01:00
Marco Hinz
2778fd928c
GUIs: redraw screen after sign update
Some GUIs (MacVim, gVim) wouldn't show placed signs after updating. Force a
redraw.

References #228.
2017-02-20 01:15:50 +01:00
Marco Hinz
40deeb3fdf
Win: string passed to job_start() must contain shell
References #228.
2017-02-19 17:11:07 +01:00
Marco Hinz
e1396b903c
Add cmd and cwd to verbose output 2017-02-19 02:23:06 +01:00
Marco Hinz
e8252ba44d
Doc: update g:signify_realtime 2017-02-18 20:26:40 +01:00
Marco Hinz
5940039dcf
REAMDE: cosmetic changes 2017-02-18 20:17:17 +01:00
Marco Hinz
05f6ff91f4
New option: g:signify_realtime
By default Sy only updates signs when opening or writing a buffer that is backed
by a file on disk.

If that's too conservative to you, enable this option. It makes Sy update signs
on almost every occasion.
2017-02-18 18:06:44 +01:00
Marco Hinz
34ee12d179
Vim compat fix: type variables were introduced in 7.4.2071
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.
2017-02-17 16:25:00 +01:00
Marco Hinz
255b2a636a
Doc: add modus operandi and debug section 2017-02-17 16:21:04 +01:00
Marco Hinz
8d35722aa1
Fix "Calling dict function without Dictionary"
Closes #223.
2017-02-17 15:14:34 +01:00
Marco Hinz
b7db40e58e
Vim uses Job instances instead of job IDs
References #222.
2017-02-17 11:29:06 +01:00
Marco Hinz
6364e8f7f2 Vim: use close_cb to trigger exit_cb
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.
2017-02-16 15:29:41 +01:00
Marco Hinz
45a28549bd
FAQ: Line highlighting without showing signs?
References #220.
2017-02-15 21:54:55 +01:00
Marco Hinz
f6d76b41d6
Neovim: fix stdout logic
References #218.
2017-02-15 15:27:24 +01:00
Marco Hinz
a2c28f6540
A diff is a list of lines and no long string anymore
References #216.
2017-02-10 17:40:11 +01:00
Marco Hinz
dd34401bc3
Prevent running Sy more than once during startup 2017-02-03 20:48:48 +01:00
Marco Hinz
dea49a1967
Fix toggling when g:signify_disable_by_default is set 2017-02-03 01:49:46 +01:00
James McCoy
8d5e018519 Rename variable to work with older (n)vim, when types were sticky
Closes #213
2017-02-01 09:10:06 -05:00
Marco Hinz
f194e3aced
Fix get_diff_start_{vcs}() for older Vims
Fixes #212.
2017-01-31 12:15:35 +01:00
Marco Hinz
6d8837f878
Fix TFS context stripping
Fixes #211.
2017-01-31 11:36:16 +01:00
James McCoy
716ce90fe4 Simplify job ID handling a little more 2017-01-30 09:31:14 -05:00
Marco Hinz
014b058d3d
Simplify job ID handling 2017-01-30 15:26:11 +01:00
Marco Hinz
82d6df9f71
Don't switch window in exit handler
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.
2017-01-30 14:50:32 +01:00
Marco Hinz
68013238b4
Restrict to be removed sign IDs to buffer 2017-01-29 02:22:35 +01:00
Marco Hinz
f7678884f0
Race condition: make sure we're still in same buffer
Fixes #207.
2017-01-23 13:37:53 +01:00
Marco Hinz
e43155f3e1
Fix typo in callback_stdout_nvim()
Fixes #206.
2017-01-23 12:50:16 +01:00
Marco Hinz
0db69f4658
Fix CVS
References #205.
2017-01-23 02:58:41 +01:00
Marco Hinz
9ced2cf73f
Fix arguments of a few diff functions
Fixes #205.
2017-01-23 02:02:03 +01:00
Marco Hinz
faf5240823
Fix exit callback
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.
2017-01-22 20:42:31 +01:00
Marco Hinz
8f3fc1c023
Simplify a few verbose messages 2017-01-18 17:27:44 +01:00
Marco Hinz
295e449db6
Add sy#util#chdir() 2017-01-18 17:15:15 +01:00
Marco Hinz
304a2b9c27
Simplify sign ID handling 2017-01-18 16:28:35 +01:00
Marco Hinz
b839e8092f
Add s:initialize_job() 2017-01-18 13:40:34 +01:00
Marco Hinz
3aa8eb9ec6
Jump to correct window in exit handler 2017-01-18 11:07:21 +01:00
Marco Hinz
3f9c4e4ea0
Don't retry VCS detection for performance purposes
For each new buffer sy#repo#detect() gets run. That function invokes callbacks
for all VCS from g:signify_vcs_list.

If no callback finds a valid repo, sy#set_signs() is never called and the VCS
type of the newly registered buffer keeps its initial value: "unknown".

The next time Sy gets run in that buffer, Sy will disable itself, so that all
subsequent times it gets run it will never even attempt to get a diff.

If a buffer was added to a repo that was initialized after Sy registered that
buffer, it will remain inactive.

In those cases, :SignifyEnable will purge the cache for the current buffer and
start all over.
2017-01-18 10:50:07 +01:00
Marco Hinz
f6a0a50e06
Only run s:set_signs() if diff was found 2017-01-18 03:43:59 +01:00
Marco Hinz
6c2b6c4f08
Refactoring 2017-01-18 02:42:00 +01:00
Marco Hinz
fcecc3c868
Remove rather useless :SignifyDebugDiff 2017-01-18 00:14:36 +01:00
Marco Hinz
31d4c55187
Make sy#verbose() slightly more useful 2017-01-17 23:57:29 +01:00
Marco Hinz
0e609fdf1d
Make Vim and job_start() work 2017-01-17 23:12:00 +01:00
Marco Hinz
72c7ba9e2b
Make all supported VCS work 2017-01-17 20:37:58 +01:00
Marco Hinz
d2fda2847f
Propagate the correct VCS 2017-01-17 19:45:03 +01:00
Marco Hinz
0df130ac6e
Make Vim + system() work 2017-01-17 19:41:55 +01:00
Marco Hinz
a67b613acf
Add more calls to sy#verbose() 2017-01-17 17:04:19 +01:00
Marco Hinz
e72ccb952d
PoC: make async work with git and Neovim 2017-01-17 16:17:16 +01:00
Marco Hinz
3ad10c65b5
First changes 2017-01-17 14:22:19 +01:00