107 Commits

Author SHA1 Message Date
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
186dada663 Warn when cursor not in a hunk. 2015-03-05 12:19:02 +01:00
Andy Stewart
c6ed14c662 Finer granularity for staging/reverting hunks. 2015-03-05 11:09:18 +01:00
Andy Stewart
067160c86b Remove obsolete comment. 2014-10-17 09:24:47 +02:00
Andy Stewart
e5eb9e6ecf Fix staging of hunks coming after deleted lines.
Previously vim-gitgutter generated context-free patches and applied
those to the index.  However when staging a hunk situated after any
deleted lines, the line numbers on the patch were out by the number
of lines deleted, and without any context git would apply the patch
to the wrong part of the file in the index.

This commit ensure patches are generated with 1 line of context,
allowing git to adjust the line numbers appropriately and apply the
patch to the right location.

More lines of context would help git more to adjust line numbers; but
the more context we have the more we group together hunks we would
like to treat separately.
2014-10-16 11:50:20 +02:00
Andy Stewart
fed2dbad34 Move every function into gitgutter namespace.
This makes profiling much easier.
2014-06-26 11:09:29 +02:00