Andy Stewart
5485c37b38
Fix bug in realtime diff of non-current buffer.
...
This bug meant that a realtime diff of a buffer which wasn't the current
one -- which happens during GitGutterAll() -- diffed the staged version
of the buffer against the current buffer's contents instead of the
buffer's contents.
2014-01-27 14:51:19 +01:00
Andy Stewart
072846e945
Don't place/unplace dummy sign unnecessarily.
2014-01-27 14:15:19 +01:00
Andy Stewart
afecd8711d
Fix precedence in diff command.
2014-01-27 13:54:11 +01:00
Andy Stewart
8ada986fcf
More accurate error message.
2014-01-27 13:41:05 +01:00
Andy Stewart
f2e08dbeb3
Move git-tracking check into diff command.
...
This avoids shelling out twice per buffer: once to check whether git
knows about the file and once to perform the diff. Now we simply do
both in one external call.
Profiling showed external calls to git taking ~20ms. This doesn't seem
too bad but it adds up.
2014-01-27 10:48:47 +01:00
Andy Stewart
13a11f8935
README improvements.
2014-01-16 12:17:02 +01:00
Andy Stewart
811d9af7a9
Comment code sections.
2014-01-16 11:33:46 +01:00
Andy Stewart
9e99e4d4f1
Neater way to toggle conditional.
2014-01-16 11:33:25 +01:00
Andy Stewart
bb87232842
Add ability to toggle signs on and off.
2014-01-16 11:32:41 +01:00
Andy Stewart
7808f9f647
Fix type of variable when clearing signs.
2014-01-16 11:22:32 +01:00
Andy Stewart
ecdf2e58a1
Whitespace.
2014-01-16 10:42:54 +01:00
Andy Stewart
0537c6945a
Use [c and ]c to jump between hunks (changes).
...
This is more consistent with Vim.
2014-01-15 15:36:13 +01:00
Andy Stewart
6c435e5681
Fix typo in map for staging hunk.
2014-01-14 15:07:22 +01:00
Andy Stewart
ae81dccb67
Add configuration option to disable key maps.
...
And add a little documentation.
2014-01-13 11:01:14 +01:00
Andy Stewart
c680694b06
Improve sign handling with better data structure.
...
Using a dictionary instead of a list clarifies the code.
2014-01-13 10:34:41 +01:00
Andy Stewart
da47098496
Fix bug in clearing signs when disabling plugin.
2014-01-13 09:44:26 +01:00
Andy Stewart
dd93685ca3
Proper sentences in bullet points.
2014-01-11 17:26:38 +01:00
Andy Stewart
e750b5fa21
Eliminate unnecessary string concatenation.
2014-01-11 17:24:11 +01:00
Andy Stewart
5bd0f7f796
Add up-to-dateness feature to README.
2014-01-10 11:13:17 +01:00
Andy Stewart
38e6524fff
Remove unnecessary argument to sign unplace.
...
Each sign instance has a unique id so we don't need to scope per file.
2014-01-10 10:51:48 +01:00
Andy Stewart
648281497f
Standardise on .
2014-01-10 10:48:20 +01:00
Andy Stewart
b1f023e230
Remove unnecessary colons.
2014-01-10 10:46:53 +01:00
Andy Stewart
ff79a0ab85
Disable vim-gitgutter during :vimgrep.
2014-01-10 10:34:24 +01:00
Andy Stewart
a5b9da9f56
Add features section to README.
2014-01-10 10:25:58 +01:00
Andy Stewart
a6ac0d879c
Whitespace
2014-01-09 18:00:29 +01:00
Andy Stewart
1ad55ae1eb
Fix type mismatch.
...
Introduced by attempt to workaround lack of support for default value in
getbufvar().
2014-01-09 17:57:19 +01:00
Andy Stewart
92abcce1ff
Stage and revert individual hunks.
2014-01-09 12:14:59 +01:00
Andy Stewart
7ce6309a01
Don't call getbufvar() with a default value.
...
Support for a default value in getbufvar() was introduced some time
after Vim 7.3.547 which is the current stable version in some package
repositories.
2014-01-09 10:05:49 +01:00
Andy Stewart
03ca0f8d93
Extract utility functions.
2014-01-08 09:55:54 +01:00
Andy Stewart
6369f5033b
Inline boolean logic.
2014-01-08 09:49:15 +01:00
Andy Stewart
2caf156c47
Eliminate redundant argument.
2014-01-08 09:47:43 +01:00
Andy Stewart
7919906105
Fix bug that processed buffers it shouldn't have.
...
All processing logic should be guarded by `utility#is_active()`.
2014-01-08 09:40:16 +01:00
darrenli
0218e08c9e
Fix GitGutter argument errors on save and toggle.
2014-01-07 21:40:34 +01:00
Andy Stewart
e88f9e16b4
Update gitignore.
2014-01-07 15:17:49 +01:00
Andy Stewart
d420a44536
Reduce duplicate work due to overlapping autocommands.
2014-01-07 15:02:27 +01:00
Andy Stewart
021a922083
Remove obsolete text.
2014-01-07 10:47:55 +01:00
Andy Stewart
88a2eb3626
Update FAQ.
2014-01-07 10:45:59 +01:00
Andy Stewart
c2cea84a7f
Remove Alternatives section.
...
I'm not going to spend time keeping it up to date so it'll just get more
and more obsolete.
2014-01-07 10:42:34 +01:00
Andy Stewart
fa582f7863
Only redraw when changing line highlighting.
2014-01-07 10:21:04 +01:00
Andy Stewart
b996dd3b53
Remove unnecessary precondition.
2014-01-06 17:11:19 +01:00
Andy Stewart
faa6aaf669
Minimise sign place/unplace calls to speed things up.
...
Profiling shows that `:sign place` and `:sign unplace` are slow despite
being native vimscript functions. This commit minimises the number of
such calls by only updating signs that have changed.
2014-01-06 17:05:01 +01:00
Andy Stewart
65b050ba2e
Fix unnecessary modified sign in modified-and-removed diff.
...
This bug didn't affect anything because the unnecessary sign was
overwritten by the correct sign.
2014-01-06 17:05:01 +01:00
Andy Stewart
c81d897d60
Reduce chance of dummy sign's id clobbering another.
2014-01-06 17:04:54 +01:00
Andy Stewart
cde54e3066
Simplify initialisation.
2014-01-06 11:47:42 +01:00
Andy Stewart
88623e3fec
Speed up snake-to-camel-case conversion.
2014-01-06 11:31:30 +01:00
Andy Stewart
a4f6acb731
Use buffer-local variables to store signs.
2014-01-06 11:22:34 +01:00
Andy Stewart
8a3d1cb88b
Remove obsolete code.
2014-01-06 10:43:53 +01:00
Andy Stewart
d3177cacd9
Remove unnecessary conditional.
2014-01-05 13:59:22 +01:00
Andy Stewart
702d27a84f
Autoload.
2013-12-17 11:03:52 +01:00
Bailey Ling
926aea86c1
Clear out hunks stats when file is not tracked.
2013-12-07 14:51:16 +00:00