Andy Stewart
774add0c59
Improve testing of private functions
2022-04-25 13:47:08 +01:00
Andy Stewart
5dd8ab6211
Fix parsing of 'git ls-files -v' for filenames with spaces
...
Fixes #829 .
2022-04-25 13:33:45 +01:00
Andy Stewart
2f359076bc
Whitespace
2022-04-23 08:30:47 +01:00
Andy Stewart
626541edeb
Heeds git's "assume unchanged" bit
...
I.e. does not diff files which should be assumed unchanged.
See:
git update-index --[no-]assume-unchanged -- <file>
git ls-files -v
Closes #826 .
2022-04-23 08:25:46 +01:00
Andy Stewart
d5bae10403
Add GitGutterDiffOrig command
...
Closes #827 .
2022-04-15 14:13:51 +01:00
Andy Stewart
18d12985ea
Document :GitGutterBuffer{Disable,Enable,Toggle}
...
These commands were added in 2dce8e03 but I forgot to document them in
the help doc.
2022-02-23 08:48:37 +00:00
Alexander Courtis
e433d5ddc1
#816 do not modify previewpopup when it does not exist
2022-02-19 13:37:19 +00:00
Andy Stewart
d845704e9e
Extract common code into function
2022-02-02 11:07:24 +00:00
Andy Stewart
23a65f370b
Fix enabling buffer when plugin disabled
...
Fixes #803 .
2022-02-02 10:58:53 +00:00
Andy Stewart
54b94f98de
Prevent 'previewpopup' from breaking hunk previews
...
See #809 .
2022-02-02 10:01:06 +00:00
Andy Stewart
384bf003f6
Allow configuration of floating window appearance
...
Closes #807 .
2022-02-02 09:23:45 +00:00
Andy Stewart
e9871cf952
Capitalise NONE for consistency
...
Although group names are case-insensitive:
- Vim's docs use NONE;
- the code already uses NONE elsewhere.
2022-02-02 08:49:44 +00:00
Mateusz Piotrowski
6039b37440
Always pass some group name to sign arguments
...
E.g., passing an empty group name to the sign argument linehl (e.g.,
"linehl=") causes the following error:
```
Error detected while processing /usr/home/0mp/.vim/plugged/vim-gitgutter/plugin/gitgutter.vim[96]..function gitgutter#highlight#define_signs[10]..<SNR>56_define_sign_line_highlights:
line 9:
E1249: Group name missing for linehl
```
This patch makes the those errors go away by passing "None" when no
group name is needed.
2022-02-02 08:49:12 +00:00
Andy Stewart
a02369403b
Fix autocmd to use <abuf> for effective buffer
...
See #814 , #607 .
2022-01-29 15:14:20 +00:00
Andy Stewart
256702dd14
Fix restoration of g:gitgutter_enabled after :vimgrep
...
Fixes #801 .
2021-09-07 15:10:00 +01:00
Georgi Kirilov
832f7c6226
fix quickfix for combined diffs
...
The --cc option is issued for merge conflicts.
2021-08-30 12:59:41 +03:00
naohiro ono
549fb96d58
Add instructions on how to customize colours in preview window
2021-08-06 16:13:14 +01:00
naohiro ono
4adaa7adaa
Make intra-highlights customizable
2021-08-06 16:13:14 +01:00
Andy Stewart
7d9b7125ff
Update quickfix test
...
See #789 .
2021-07-12 11:22:11 +01:00
caojoshua
ca0f292e68
Use 0/1 instead of v:true/v:false for compatibility with older vim
...
versions.
2021-07-12 11:03:37 +01:00
caojoshua
aad6acea5d
When using loclist, only add hunks for current file.
2021-07-12 11:03:37 +01:00
Andy Stewart
0f98634b92
Add caveat to setting of Windows git executable
...
See #668 .
2021-06-08 16:29:34 +01:00
Andy Stewart
68a8cb300c
Close preview on escape: only map <Esc> while preview open
...
This only applies to floating preview windows on Neovim.
Handles the following way of closing the floating preview:
- <Esc>
- Moving cursor
- 2<C-W>c (where 2 is the floating window's window number)
- <C-W><C-W> to move into and out of the floating window
Closes #786 .
2021-06-03 12:23:58 +01:00
Andy Stewart
2571c8f520
Enable is_preview_window_open() to handle floating windows
...
See #784 .
2021-06-02 11:52:37 +01:00
Andy Stewart
5b4ec87517
Expose is-open and close hunk-preview-window functions
...
This allows custom maps for closing the hunk preview window.
See #784 .
2021-06-02 11:49:42 +01:00
Andy Stewart
d13d58a35f
Clear unwanted characters in nmap
...
See #784 .
2021-06-02 11:44:18 +01:00
Andy Stewart
10998f303c
Move more important paragraph above less important ones
2021-05-24 09:45:39 +01:00
Andy Stewart
ba21c56129
Expand docs on how to close a hunk preview window
...
See #784 .
2021-05-24 09:44:56 +01:00
Andy Stewart
f4bdaa4e9c
Remove useless comparison
2021-04-22 19:41:59 +01:00
Andy Stewart
66bafa5348
Update open preview on hunk jump
...
See #396 , #779 .
2021-04-22 15:42:45 +01:00
Andy Stewart
e288dd4733
Suppress echoing of preview window file name
...
The file name does not mean anything so it is unhelpful to show it.
Not showing it avoids the hit-enter prompt which can occur.
2021-04-22 15:37:28 +01:00
Andy Stewart
100bee7dab
Remove stale link
2021-04-22 14:55:01 +01:00
Vincent Cordobes
42ed714fb9
Capitalize warning messages
2021-04-22 12:03:06 +01:00
Vincent Cordobes
602a5ba19e
Clean up warning messages
2021-04-22 12:03:06 +01:00
Andy Stewart
9756e95bd5
Fix resizing of existing non-floating hunk preview window
...
This bug was introduced by 9784226 in #708 . It had the effect of not
allowing an existing hunk preview window to increase in size for a
larger hunk (up to 'previewheight').
See #775 .
2021-04-13 15:18:27 +01:00
Andy Stewart
24cc477895
Avoid cursor in unexpected window after Esc in preview
...
Thanks @andymass for the patch.
See #769 .
2021-03-19 16:31:26 +00:00
Andy Stewart
7224d1d8d7
Ensure backward compatibility with 'previewpopup' option
2021-03-18 11:05:56 +00:00
Andy Stewart
f2a825f405
Use floating window for preview instead of popup
2021-03-17 14:30:49 +00:00
Andy Stewart
64062dfe02
Simplify opening of preview window
2021-03-16 12:06:31 +00:00
Andy Stewart
f3145958dd
Make statusline blank in hunk preview window
...
I would prefer to remove the statusline altogether in the hunk preview
window, making it consistent with the floating preview window. However
I do not think that is possible; the best one can do is make it blank.
2021-03-15 17:00:33 +00:00
Andy Stewart
2a0411c10c
Revert GitGutterGetHunkSummary() to show hunks when inactive
...
In da77e46310 the function changed to be
consistent with GitGutterGetHunks(), i.e. to show "no data" if called in
a buffer for which gitgutter is inactive.
This function is mostly used in status lines. GitGutter is inactive
when a popup window is open. The commit mentioned above meant that when
a completion window was open, the hunk summary in the status line
changed to show no data. It changed back again once the completion
window was closed, but the overall effect was a little distracting.
This commit reverts the change.
Closes #771 .
2021-03-15 16:45:26 +00:00
Andy Stewart
1283ec1670
Make error message useful
2021-02-22 14:15:46 +00:00
Andy Stewart
b90aad666a
Ensure GitGutterGetHunks() always returns a 3 element list
...
Thanks to @sebastianmarkow for pointing this out.
2021-02-16 18:04:12 +00:00
Andy Stewart
da77e46310
Make consistent with GitGutterGetHunks()
2021-02-16 16:05:41 +00:00
Andy Stewart
6019d43860
Ensure hunk summary is updated during a hunk op
...
Fixes #765 .
2021-02-16 16:04:47 +00:00
acelya
2e3cd54ed6
Fix pwsh/powershell test when used with a parameters
...
Like `set shell=pwsh\ -NoLogo`.
2021-02-11 09:13:02 +00:00
Andy Stewart
d249be7f3c
Update help doc
...
See #718 .
2021-02-08 12:52:31 +00:00
Andy Stewart
f440ed04dd
Enable <Esc> to close floating preview window
...
See #718 .
2021-02-08 12:48:01 +00:00
obcat
0cbe0f392d
Prevent hunk preview using preview window from changing alternate file
2021-02-06 11:37:12 +09:00
Andy Stewart
ff9d134f0c
Add help file modeline
2021-01-26 11:12:56 +00:00