motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit aff3359699559231faee7d645678f71190700ec6 (tree)
parent 66a927524a131ae9b68dffc818ab9d9dc48f166c
Author: Tim Pope <code@tpope.net>
Date:   Tue, 25 Jun 2019 04:02:24 -0400

Retire :Gedit ^n and :Gedit ~n

Diffstat:
Mautoload/fugitive.vim | 9++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -863,9 +863,8 @@ function! s:Expand(rev) abort let file = 'HEAD^{}' . a:rev[1:-1] . s:Relative(':') elseif a:rev =~# '^@{' let file = 'HEAD' . a:rev. s:Relative(':') - elseif a:rev =~# '^\^[0-9~^{]\|^\~[0-9~^]' - let commit = substitute(s:DirCommitFile(@%)[1], '^\d\=$', 'HEAD', '') - let file = commit . a:rev . s:Relative(':') + elseif a:rev =~# '^\^[0-9~^{]\|^\~[0-9~^]\|^\^$' + call s:throw('Use ' . string('!' . a:rev . ':%') . ' instead of ' . string(a:rev)) else let file = a:rev endif @@ -3203,8 +3202,8 @@ function! s:Open(cmd, bang, mods, arg, args) abort return 'echo ' . string(':!' . git . ' ' . args) endif - let [file, pre] = s:OpenParse(a:args) try + let [file, pre] = s:OpenParse(a:args) let file = s:Generate(file) catch /^fugitive:/ return 'echoerr v:errmsg' @@ -3242,8 +3241,8 @@ function! s:ReadCommand(line1, line2, range, count, bang, mods, reg, arg, args) call fugitive#ReloadStatus() return 'redraw|echo '.string(':!'.git.' '.args) endif - let [file, pre] = s:OpenParse(a:args) try + let [file, pre] = s:OpenParse(a:args) let file = s:Generate(file) catch /^fugitive:/ return 'echoerr v:errmsg'