Commit Graph

772 Commits

Author SHA1 Message Date
Balki
7c48aa1e72 Use config option gitgutter_diff_base in quickfix window 2020-03-27 13:40:24 +00:00
Andy Stewart
0e509fb0ac Set diff base when viewing file versions with Fugitive
When you look at previous versions of a file, e.g. with Fugitive's
:0Gclog, gitgutter will set the diff base to the current version's
parent so that diff markers appear as expected.

Thannks to @rcreasi for the idea and initial implementation.
2020-03-12 10:38:58 +00:00
Andy Stewart
c337eef1b7 Make hunk commands noops when file not tracked by git
Fixes #680.
2020-02-24 15:42:05 +00:00
Andy Stewart
8e368ae8d1 Extract has_repo_path() function 2020-02-24 15:16:51 +00:00
Andy Stewart
669357bb92 Fix #repo_path() return value when path not set
This change makes it an empty string, as documented, not 0.
2020-02-24 15:10:55 +00:00
Andy Stewart
a75fd77a78 Do not run diff unnecessarily 2020-02-24 14:33:22 +00:00
Daniel Hahler
da2c785221 Set scriptencoding for file with utf8 BOM 2020-02-13 11:25:10 +00:00
Daniel Wyatt
2ef4f7e7b2 Use known shell for git_supports_command_line_config_override. 2020-01-22 09:00:31 +00:00
Andy Stewart
9add23a492 Document how to get diff stats in statusline
Closes #674.
2020-01-15 11:50:47 +00:00
Andy Stewart
0946c53cfc Clarify line number highlights require sign column.
See #669.
2020-01-06 14:13:29 +00:00
Andy Stewart
91bd300021 Document 'updatetime' also controlling writing of swap files.
See #672.
2020-01-06 11:52:07 +00:00
Andy Stewart
1c53af9a0d Listen to FugitiveChanged autocmd
Closes #666.
2019-12-03 15:27:08 +00:00
Andy Stewart
c31581c25b More idiomatic line number navigation 2019-11-25 12:14:38 +00:00
Andy Stewart
bced2175f8 Add snippet for cycling hunks in current buffer.
Thanks @andys8 :)

Closes #667.
2019-11-25 12:12:49 +00:00
Richard Robbins
fa8d0feb41 Update README.md with g:gitgutter_use_location_list info 2019-11-22 13:25:40 +02:00
Richard Robbins
d36686e6a5 Add g:gitgutter_use_location_list option 2019-11-22 13:25:40 +02:00
tamago324
b97acf2c8a Fix typo in doc 2019-11-20 13:14:38 +02:00
Morgan Terry
af20a9fcff Fix example mappings 2019-10-24 13:11:11 +03:00
Andy Stewart
5c73edb3c2 Fix write_buffer() to not add extra line for dos fileformat 2019-10-15 10:14:10 +01:00
Andy Stewart
ed978c40eb Fix dos undo test 2019-10-15 10:14:00 +01:00
Andy Stewart
7e1ca55646 Fix test names 2019-10-15 10:13:02 +01:00
Andy Stewart
af4aded958 Add blank line to end of dos fixture 2019-10-14 17:38:49 +01:00
Andy Stewart
320b7a33e7 Fix preview and undo hunk for dos line endings 2019-10-14 10:10:46 +01:00
Andy Stewart
1725c13add Simplify installation instructions 2019-10-01 10:39:23 +01:00
Andy Stewart
236ced01c7 Clarify that plugin compares buffer not working tree 2019-09-30 13:26:40 +01:00
Andy Stewart
c656fc94d2 Add FAQ on diff highlight groups 2019-09-30 13:26:17 +01:00
Andy Stewart
0bcd8c5b9c Update signs if linenrs highlighted
Fixes #656.
2019-09-30 13:20:43 +01:00
Andy Stewart
32fb9895b7 Do not clear signs when disabling signs if linenrs highlighted 2019-09-30 13:20:17 +01:00
Andy Stewart
cc5108e9a7 Avoid unnecessary diff enabling signs when linenrs highlighted 2019-09-30 13:19:11 +01:00
Andy Stewart
178764e9a1 Whitespace 2019-09-30 13:17:23 +01:00
Andy Stewart
54eff3e545 Clarify variable name 2019-09-30 12:56:10 +01:00
Andy Stewart
44bb472bac Add changed indicator for closed folds
Closes #655.
2019-09-27 16:50:14 +01:00
Andy Stewart
883b2be1db Test s:split does not use regex 2019-09-27 13:16:23 +01:00
Andy Stewart
6b08e1425b Include accumulated prefix offsets when recursing 2019-09-26 16:57:27 +01:00
Andy Stewart
09bc754efc Fix splitting on a string not a pattern 2019-09-26 16:56:19 +01:00
Andy Stewart
b94fab3070 Use matchaddpos() instead of text properties
matchaddpos() has better backward compatibility than text properties.  I
only used text properties inside Vim popups because I did not think
there was a way to use matchaddpos(), but then I found a way.
2019-09-26 15:08:56 +01:00
Andy Stewart
ba049e707a Add note 2019-09-24 18:38:54 +01:00
Andy Stewart
45347c9a4b Add comment 2019-09-24 18:38:36 +01:00
Andy Stewart
f2ea4f7034 Fix missing empty string when LCS at one end 2019-09-24 18:38:12 +01:00
Andy Stewart
3405ad72b6 Handle edge case in common prefix calculation 2019-09-24 18:33:12 +01:00
Andy Stewart
ccd4972d23 Fix off-by-one error in LCS calculation 2019-09-24 17:10:26 +01:00
Andy Stewart
d2796a277e Use relative path for screenshot 2019-09-24 11:44:01 +01:00
Andy Stewart
6660aca947 Update screenshot to include hunk preview 2019-09-24 11:37:14 +01:00
Andy Stewart
677a80c4ed Only show intra line highlights in Vim popups when supported 2019-09-24 11:25:48 +01:00
Andy Stewart
dfa6972b67 Add intra-line change highlighting for Vim popups 2019-09-24 11:07:29 +01:00
Andy Stewart
9231bda97f Enable intra-line highlights to handle multiple regions
For example consider:

    -The cat in the hat.
    +The ox in the box.

Before this change the highlights would be:

    -The cat in the hat.
         ^^^^^^^^^^^^^^
    +The ox in the box.
         ^^^^^^^^^^^^^

After this change the highlights are:

    -The cat in the hat.
         ^^^        ^^^
    +The ox in the box.
         ^^        ^^^

Another example; before:

    -The quick brown fox jumped
    +The (quick) brown (fox) jumped
         ^^^^^^^^^^^^^^^^^^^

And after:

    -The quick brown fox jumped
    +The (quick) brown (fox) jumped
         ^     ^       ^   ^
2019-09-24 10:26:31 +01:00
Andy Stewart
68e735b92c Improve intra-line change highlighting
Handle two insertions and two deletions.
2019-09-23 15:59:37 +01:00
Andy Stewart
ae9edf0602 Fix non-empty suffix condition 2019-09-23 13:19:49 +01:00
Andy Stewart
f980fab55c Do not enable syntax in Vim floating popup
Fixes #653
Closes #654
2019-09-23 10:33:17 +01:00
Andy Stewart
76aa5920db Handle no prefix in GitGutterQuickFix
Fixes #649.
2019-09-19 12:26:38 +01:00