Andy Stewart
72226496b3
Add test for encoding conversion.
2018-03-14 14:44:33 +00:00
Andy Stewart
813723a195
Whitespace.
2018-03-14 14:40:14 +00:00
Andy Stewart
efd373d86d
Move look-up out of loop.
2018-03-14 14:40:06 +00:00
Bakudankun
3b2461b2fb
Fix wrong signs when &encoding and &fileencoding differ
2018-03-14 14:34:24 +00:00
Andy Stewart
2f736d58b4
Backward compatibility for nvim-0.1.7.
...
NeoVim 0.1.7 does not support the `function()` function accepting an
optional argument list.
Fixes #496 .
2018-03-14 11:43:36 +00:00
Andy Stewart
380e7935b7
Make test flag more specific.
2018-03-08 11:47:08 +00:00
Chayoung You
538e07882a
Handle files in different drive on Windows
2018-03-06 03:07:42 -08:00
Andy Stewart
b87aacbbfe
Do not treat win32unix as Windows.
...
This reverts 16568f4815 which was, I believe now, mistaken.
See #471 .
2018-03-06 10:55:47 +00:00
Plamen Kolev
983193456f
Ignore the arguments when testing the grep executable
2018-03-05 15:54:47 +00:00
Andy Stewart
5db4a3a2a5
Make robust the replacement of temp file paths with actual paths.
...
The previous implementation meant the temp file paths were treated as
regular expressions, which was vulnerable to problems with backslashes
etc.
See #494 .
2018-03-02 12:44:49 +00:00
Andy Stewart
fa85bd41d9
Pass filepath into s:fix_file_references() to make function pure.
2018-03-02 11:41:48 +00:00
Andy Stewart
05e538e553
Remove irrelevant comment.
2018-03-01 10:24:08 +00:00
Daniel Hahler
85d762fff6
Improve warning message for max-signs-exceeded
2018-03-01 10:11:03 +00:00
Daniel Hahler
41b951e64e
Fix gitgutter#utility#warn_once: use echom
...
This a) logs the message to be seen in `:mess` and b) avoids the
hit-ENTER prompt (which is likely caused by the message not being
logged and Vim deciding that you need to see it then).
So a) fixes b).
2018-03-01 10:11:03 +00:00
Daniel Hahler
2fe748b48f
plugin/gitgutter.vim: use command! to allow for reloading
2018-03-01 10:06:56 +00:00
Andy Stewart
0055e97bac
Use '-c "core.safecrlf=false"' to avoid unhelpful line ending warnings.
...
See #486 .
2018-02-28 19:17:31 +00:00
Andy Stewart
33c4c4a685
Enable update on FocusGained for gVim.
...
This was prevented to avoid an infinite loop on gVim (see #42 ).
However that was 5 years ago and this no longer seems to be a problem
(even running synchronously).
2018-02-28 16:56:26 +00:00
Andy Stewart
293b633d79
Add --no-pager to git-show and git-diff.
...
I needed these to get output from the commands on Windows.
2018-02-28 16:45:39 +00:00
Andy Stewart
c39a5c240a
Add g:gitgutter_terminal_reports_focus to enable FocusGained workaround.
...
See #490 .
2018-02-28 15:09:36 +00:00
Andy Stewart
4a66a09658
Document dependency on focus events.
2018-02-28 11:43:00 +00:00
Andy Stewart
2a3ab77f10
Access tab variable directly instead of via {g,s}ettabbar().
...
Fewer function calls and better backward compatibility.
2018-02-27 11:37:38 +00:00
Andy Stewart
e512d3a6fc
Make the process_hunks() function public.
...
This is so other plugins, e.g. vim-signature, may use it.
Closes #489 .
2018-02-26 08:58:27 +00:00
Andy Stewart
b27ee4d602
Rename variable for clarity.
2018-02-22 16:23:17 +00:00
Andy Stewart
816fc98ff2
Swap order of if/else so it reads better.
2018-02-22 11:09:05 +00:00
Andy Stewart
61a5e0143e
Do not warn user when default grep cannot be found.
...
This restores the behaviour that was accidentally changed in 5bfe5b9 .
2018-02-22 11:06:34 +00:00
Andy Stewart
e9aee00190
Switch off diff.mnemonicPrefix in tests.
...
Follows on c325a8b .
2018-02-22 11:04:10 +00:00
Andy Stewart
c3bad229db
Use built-in uniq() when available.
2018-02-22 10:32:21 +00:00
Andy Stewart
87097d8923
Fix bugs in s:uniq().
...
I can't believe I got this wrong.
Fixes #485 .
2018-02-22 10:17:28 +00:00
Daniel Hahler
c325a8b6d3
s:fix_file_references: handle diff.mnemonicPrefix
...
An alternative would be to run `git` with no user config always, i.e.
setting `GIT_CONFIG_NOSYSTEM` and `HOME=/dev/null` (different for
Windows then) in its environment. Maybe there's an easier way / single
option for this..
2018-02-22 09:49:31 +00:00
Andy Stewart
9325986457
Remove deprecated command GitGutterRevertHunk.
2018-02-21 12:23:02 +00:00
Andy Stewart
8f6bbc9855
Extract uniq function.
2018-02-21 12:06:42 +00:00
Daniel Hahler
d78184e646
Use processed-dict, uniq() might not be available
2018-02-21 11:54:15 +00:00
Daniel Hahler
6c2def1075
Use sort+uniq with tabpagebuflist to remove duplicates
2018-02-21 11:54:15 +00:00
Daniel Hahler
4931dd1a82
Conditionally define s:vimdiff
...
This optimizes it a bit since the `exists()` is not called always.
2018-02-21 11:46:36 +00:00
Daniel Hahler
18f6d0ffe1
gitgutter#utility#setbufvar: skip unnecessary setbufvar
...
An existing dict gets returned by reference, so changing it does not
need a call to `setbufvar` afterwards.
2018-02-21 11:39:42 +00:00
Daniel Hahler
10254400c3
doc: fix example for g:gitgutter_diff_args
2018-02-21 11:35:53 +00:00
Andy Stewart
798abe53b3
Extract helper for triggering gitgutter.
2018-02-21 11:33:44 +00:00
Andy Stewart
35c92dbd50
Add test for user autocmd.
2018-02-21 11:31:48 +00:00
Daniel Hahler
a046b5ace1
Improve GitGutter User autocommand: context/unsilent
...
This provides `g:gitgutter_hook_context` during the hook's execution and
removes the `:silent`, but uses `exists()` instead.
The bufnr might be necessary to know in the User autocommand, e.g. to
clear some cache.
Not using`:silent` is good practice in general to not hide (wanted)
output and errors etc.
2018-02-21 11:23:02 +00:00
Andy Stewart
4692457ae2
Document how to disable realtime updates.
2018-02-19 14:31:59 +00:00
Andy Stewart
38a7789be9
Finish when pre-requisites not fulfilled.
2018-02-19 14:04:49 +00:00
Andy Stewart
d86ac1353f
Avoid race conditions when processing multiple buffers asynchronously.
...
Fixes #472 .
2018-02-19 12:56:22 +00:00
Andy Stewart
457f35e444
Ensure a re-activated buffer runs a diff.
...
See #303 .
2018-02-19 10:59:39 +00:00
Andy Stewart
ef94b195ab
Add tests for text objects.
2018-02-19 10:51:21 +00:00
Patryk Czachurski
314e64673b
Fixed call to current_hunk in hunk text object
2018-02-19 10:14:34 +00:00
Andy Stewart
790ffa476a
Simplify reading of buffer variable.
2018-02-17 09:19:28 +00:00
Andy Stewart
16568f4815
Add win32unix to OS check.
2018-02-16 15:40:02 +00:00
Andy Stewart
13361da09e
Only use overbar sign when UI supports it.
...
Thanks @h3xx.
Closes #471 .
2018-02-16 13:06:23 +00:00
Andy Stewart
7e3f41cdec
Update docs.
2018-02-16 12:54:04 +00:00
Andy Stewart
ec6e1e484b
Update docs with changed grep option.
...
Thanks @ErichDonGubler.
Closes #467 .
2018-02-16 10:52:24 +00:00