Andy Stewart
67c8cca890
Support Vim's popup windows for hunk previews.
...
Note this prevents staging partial hunks via the previw window.
2019-08-27 16:56:30 +01:00
Andy Stewart
f0f56b9569
Use floating windows for hunk previews on Neovim.
2019-08-27 16:02:51 +01:00
Andy Stewart
0c3e7219b4
Extract operations on hunk preview window.
2019-08-27 11:52:50 +01:00
Daniel Hahler
e929cb8b86
Prevent whitespace problems in test.
2019-08-22 15:41:30 +01:00
Andy Stewart
7dfbb8be11
Fix incorrect expectations in test.
2019-08-22 15:16:43 +01:00
Andy Stewart
5458e3db8a
Use feedkeys() so cabbrev sees it.
2019-08-22 15:15:54 +01:00
Andy Stewart
77fb3fd81e
Enable :w in preview window to stage the hunk.
2019-08-21 10:27:23 +01:00
Andy Stewart
46f15ed42a
More doc updates.
2019-08-16 16:52:38 +01:00
Andy Stewart
c351eb13cf
Update docs.
2019-08-16 16:38:32 +01:00
Andy Stewart
cbaa22e38c
Use sign functions, groups, and priority, where available.
...
On Vims that support it, signs are placed in the "gitgutter" group with
a priority set by g:gitgutter_sign_priority.
Closes #544 .
Closes #576 .
Closes #627 .
2019-08-16 16:21:06 +01:00
Andy Stewart
afe94ede1b
Do not use a dummy sign to keep the sign column open.
...
This removes the g:gitgutter_sign_column_always option.
Vim 7.4.2201 introduced the |signcolumn| option to configure when the
signcolumn is visible, building in behaviour which the plugin provided
manually.
Although it would be good to maintain this feature for older Vims, the
complexity added by the code outweighs the benefit of backward
compatibility.
2019-08-16 12:06:28 +01:00
Andy Stewart
f6f425e4cf
Do not use a dummy sign to prevent sign column flicker.
...
In fe2b4ec869 (from 2013) the plugin
started using a dummy sign to prevent the sign column briefly
disappearing then reappearing when updating signs.
Since then Vim has vastly improved its handling of signs and the sign
column no longer flickers like this.
2019-08-16 11:55:01 +01:00
Andy Stewart
53996f5cd1
Use simpler syntax for zero-width positive lookbehind.
2019-08-15 11:58:14 +01:00
Andy Stewart
e608bff4a3
Update signs after a Fugitive :Gwrite.
...
See tpope/vim-fugitive#503.
Closes #502 .
2019-08-15 11:43:30 +01:00
Andy Stewart
71bbe88525
Distinguish normal and visual modes in map check.
...
Fixes #642 .
2019-08-13 19:22:04 +01:00
Andy Stewart
070cfc531a
Move to line more idiomatically.
2019-08-13 16:02:12 +01:00
Andy Stewart
b036fcf527
Stage part of any hunk.
...
See #279 .
2019-08-13 15:57:22 +01:00
Andy Stewart
a5ee9f2f11
Rename variables for clarity.
2019-08-13 15:47:34 +01:00
Andy Stewart
c9fd335246
Add comments.
2019-08-13 15:45:51 +01:00
Andy Stewart
773a5697f1
Warn user when git rejects patch.
2019-08-13 15:45:29 +01:00
Andy Stewart
50a7a9f6cb
Ensure no extra blank line in hunk preview window.
...
Closes #640 .
2019-08-13 13:06:58 +01:00
Andy Stewart
609b2170bf
Merge branch 'master' of ssh://github.com/airblade/vim-gitgutter
...
* 'master' of ssh://github.com/airblade/vim-gitgutter:
Fix #639 : Use more careful way to enable `numhl`
2019-08-12 17:20:02 +01:00
Andy Stewart
bc1d28db46
Allow staging part of an additions-only hunk.
...
See #279 .
2019-08-12 17:19:05 +01:00
delphinus
f2bf8376ae
Fix #639 : Use more careful way to enable numhl
...
The development versions of v0.3.2 also report `has('nvim-0.3.2')` to be
true even if they do not support the `numhl` feature. So here it catches
and ignores the possible errors.
2019-08-12 12:08:47 +01:00
Andy Stewart
fef14f1d49
Ignore non-gitgutter signs by default on Neovim >= 0.4.0
...
See #627 .
2019-08-12 10:03:59 +01:00
Dan Aloni
9bf988bd1d
Add g:gitgutter_sign_allow_clobber to control clobbering.
...
I.e. how gitgutter handles non-gitgutter signs.
See #565 , #627 .
Co-authored-by: Andy Stewart <boss@airbladesoftware.com >
2019-08-10 07:29:15 +01:00
Andy Stewart
de200ffdd4
Document cmd.exe vulnerability where it can execute the wrong git.
...
See #508 , #538 .
2019-08-10 06:16:13 +01:00
delphinus
6c320c71c5
Update README
2019-08-08 16:40:35 +01:00
delphinus
c9ef2cd3d0
Fix typo in existent doc
2019-08-08 16:40:35 +01:00
delphinus
eb89ba52dc
Add doc for highlighting line numbers
2019-08-08 16:40:35 +01:00
delphinus
fc4f9d2039
Add commands to control numhl highlights
2019-08-08 16:40:35 +01:00
delphinus
67b3ed65e3
Enable to toggle numhl
2019-08-08 16:40:35 +01:00
delphinus
78876150ae
Add logic for sign with numhl
2019-08-08 16:40:35 +01:00
Andy Stewart
ed4d8bec89
Add note to readme about preview window location.
2019-08-08 16:33:47 +01:00
Andy Stewart
e564c28b6a
Add link in docs.
2019-08-08 16:32:18 +01:00
homestar
8985017094
Add g:gitgutter_preview_win_location option
2019-08-08 16:31:44 +01:00
Andy Stewart
c75c83df53
Ensure maps set on all buffers for vim -o/-O.
...
Fixes #634 .
2019-07-26 10:27:58 +01:00
Andy Stewart
91471746fe
Avoid asynchronous job while vim is starting.
...
An asynchronous job at startup evidently triggers a Vim (not NeoVim)
rendering bug in some terminals and/or with certain colorschemes.
Terminals reported to be affected: libvte-based ones such as
gnome-terminal, xfce4-terminal, lxterminal, kitty.
Terminals reported to be unaffected: xterm, urxvt.
Closes #619 .
2019-07-01 11:24:45 +01:00
Andy Stewart
8aac968f1a
Update issue template.
2019-06-19 14:46:53 +01:00
Andy Stewart
eddec4a59a
Fix typo in tmux command.
2019-06-19 14:45:24 +01:00
Andy Stewart
5989eb882e
Do not overwrite registers when undoing hunks.
...
Fixes #629 .
2019-06-14 16:56:28 +01:00
Andy Stewart
dc3c0dcd2a
Ensure git calls always use configured args for git.
...
See #628 .
2019-06-14 12:52:13 +01:00
Andy Stewart
07b60b584e
Update signs when file renamed via :saveas
...
Fixes #551 .
2019-06-04 12:37:59 +01:00
Jonny Bylsma
25f3c56335
Make conditional style consistent with codebase
2019-06-04 11:42:20 +01:00
Jonny Bylsma
8696c880df
In get_hl(), discard returned synIDattr values of -1
2019-06-04 11:42:20 +01:00
Daniel Hahler
a4e8d3f188
gitgutter#utility#getbufvar: handle not existing buffer
2019-06-03 11:58:08 +01:00
Daniel Hahler
d7777b325a
gitgutter#utility#getbufvar: handle not existing buffer
...
`getbufvar(a:buffer, '')` returns '' then, resulting in an error.
2019-06-03 11:55:54 +01:00
Daniel Hahler
9f21e3dbba
Simplify getting highlight fg/bg
2019-06-03 11:32:09 +01:00
Andy Stewart
a7650790ea
Work around older Vims not accepting arguments for function().
...
Fixes #618 .
2019-05-31 07:17:36 +01:00
Andy Stewart
6affbc96f1
Invert boolean conditions for clarity.
2019-05-29 14:37:16 +01:00