Andy Stewart
1a7f1c5bf6
Fix typo with variable scope.
2015-03-10 12:11:04 +01:00
Andy Stewart
11b6813b94
Use echo instead of echom.
...
No need to save the warnings in the messages list.
2015-03-10 12:10:32 +01:00
Andy Stewart
1be63d780c
Use warn function instead of plain echo.
2015-03-10 12:10:17 +01:00
Maximilian Antoni
275d598196
Echo message if no next/previous hunk is available
...
Gives some feedback when hunk navigation does nothing.
2015-03-10 11:25:10 +01:00
Andy Stewart
7f7451813c
Use an up to date vim in tests.
2015-03-10 10:18:30 +01:00
Andy Stewart
3420cbf6cb
Preserve alternate buffer when processing realtime diff.
...
See #238 .
2015-03-10 10:17:34 +01:00
Andy Stewart
a86a32c530
Test stage/revert is noop when outside a hunk.
2015-03-05 12:57:07 +01:00
Andy Stewart
186dada663
Warn when cursor not in a hunk.
2015-03-05 12:19:02 +01:00
Andy Stewart
1e97331587
Add test for revert subsequent nearby hunk.
2015-03-05 11:49:27 +01:00
Andy Stewart
05030aa565
Add test for staging subsequent nearby hunk.
2015-03-05 11:43:39 +01:00
Andy Stewart
65f03a6fd5
Rename function for clarity.
2015-03-05 11:36:43 +01:00
Andy Stewart
c6ed14c662
Finer granularity for staging/reverting hunks.
2015-03-05 11:09:18 +01:00
Andy Stewart
4e22ad501f
Add a simple log function.
2015-03-04 14:40:40 +01:00
Eli Young
d59ac0394a
Don't use --color if grep doesn't support it
...
Not all versions of grep support the --color flag. This checks the
output of grep --help when building the grep command and avoids using
flags that aren't compatible with the version present.
Fixes #234 .
2015-03-04 11:22:39 +01:00
Andy Stewart
4a239a7602
Idiomatic execute.
2015-03-04 11:00:01 +01:00
Eli Young
d613f0f3b2
Remove buffer_contents function
...
This was only used for realtime diffs, which now write to a temporary
file.
2015-03-04 10:55:32 +01:00
Eli Young
0cb1e41b23
Use a temporary file for buffer for realtime diffs
...
`git diff` doesn't perform EOL conversion on stdin, causing it to
mistakenly flag every line as having changed when the working tree uses
a different EOL than the blobs. Writing the buffer to a temporary file
and diffing against that avoids this issue.
Fixes #232 .
2015-03-04 10:55:31 +01:00
Eli Young
06240f3af3
Delete temporary blob file after use
2015-03-04 10:55:31 +01:00
Andy Stewart
1fae335a65
Force grep to produce colourless output.
2015-03-03 10:52:07 +01:00
Andy Stewart
f6d5b8297f
Add note to check grep produces colourless output.
2015-02-27 09:57:34 +00:00
Andy Stewart
061258e044
Add note about solarized-dark.
2015-02-11 10:04:27 +01:00
Andy Stewart
e5efbaffc0
Fix Markdown typo.
2015-01-15 15:00:15 +01:00
Andy Stewart
6b8e908cc9
Enable . command to work with staging/reverting hunks.
2015-01-14 10:40:43 +01:00
Lingnan Dai
25257c44e7
Dealt with the case where the preview window is used by another plugin
2015-01-07 16:55:25 +01:00
Andy Stewart
2c8e82ab80
Add another note for Fish users to README.
2015-01-07 16:41:51 +01:00
Andy Stewart
1a68abedf1
Update caveat about visual artefacts.
2014-12-06 12:16:34 +01:00
Andrea Cedraro
88c7916d2f
Use system() with silent to avoid visual artifact
2014-11-30 17:54:24 +01:00
Andy Stewart
57342e33a5
Minor refactor.
2014-11-19 10:06:17 +01:00
Andy Stewart
7ff7455019
Add tests for ambiguous filenames.
2014-11-19 10:03:33 +01:00
Chris Bandy
f73df41654
Handle files with the same name as revisions.
...
Before this change diffing a file with the same name as a branch would
fail because git found the name ambiguous.
See #210 .
2014-11-19 10:01:09 +01:00
Andy Stewart
83309ee075
Cache the fact that a file is known to git.
...
This allows us to avoid checking whether a file known to git is known to
git every time we run a diff.
2014-11-17 15:41:44 +01:00
Andy Stewart
7f70d520ec
Refactor the test cleanup.
2014-11-14 14:35:24 +01:00
Andy Stewart
d56d26b559
Test runner's exit code reports number of failures.
2014-11-14 14:34:30 +01:00
Andy Stewart
af1f405692
Add test for filenames with square brackets.
2014-11-14 14:23:46 +01:00
Andy Stewart
a114088f22
Support symlinked files.
...
Adds support for when a symlink file <target> points to another file
<source>, where <srouce> is a file under Git version control.
Thanks to @Z1MM32M4N for work on this (see #209 ).
2014-11-14 14:16:40 +01:00
Andy Stewart
4ca2de65b7
More tests.
2014-11-14 14:14:42 +01:00
Andy Stewart
6cef76aa99
Add tests.
2014-11-14 14:06:49 +01:00
Andy Stewart
dfe985a1a6
Use buffer numbers instead of buffer names.
...
Also don't pass buffer number to functions when they can look it up
themselves.
Using buffer numbers also eliminates any ambiguity which might arise
from symbolic links, where you have potentially two names for a file.
Thanks to @Z1MM32M4N for work on this (see #209 ).
2014-11-14 12:55:40 +01:00
Andy Stewart
ce4e3d7c9a
Add test for sign column.
2014-11-13 15:36:23 +01:00
Andy Stewart
6d91198859
Drop extension for bash script.
2014-11-13 15:32:15 +01:00
Andy Stewart
d7a1785b94
Add test for reverting hunks.
2014-11-13 15:30:48 +01:00
Andy Stewart
e5add67b03
Use clearer file extensions for test files.
2014-11-13 15:27:52 +01:00
Andy Stewart
1f2bb48be5
Add test for hunk staging.
2014-11-13 15:21:37 +01:00
Andy Stewart
dd054534a0
Allow multiple expectations per test.
2014-11-13 15:21:19 +01:00
Andy Stewart
86cde1a919
Add basic test stats.
2014-11-13 14:46:10 +01:00
Andy Stewart
d24686e1bc
Extract name manipulation.
2014-11-13 14:41:26 +01:00
Andy Stewart
7d0492e509
Add section on limitations of current tests.
2014-11-13 14:30:51 +01:00
Andy Stewart
4ad4c97bb2
DRY quitting vim after each test.
2014-11-13 14:28:48 +01:00
Andy Stewart
b9f4173f7c
Refactor tests to be isolated.
2014-11-13 12:32:42 +01:00
Andy Stewart
a82bc509a9
Ignore test output.
2014-11-12 16:55:00 +01:00