Skip to content

Commit

Permalink
Echo message if no next/previous hunk is available
Browse files Browse the repository at this point in the history
Gives some feedback when hunk navigation does nothing.
  • Loading branch information
mantoni authored and airblade committed Mar 10, 2015
1 parent 7f74518 commit 275d598
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions autoload/gitgutter/hunk.vim
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ function! gitgutter#hunk#next_hunk(count)
let hunk_count += 1
if hunk_count == a:count
execute 'normal!' hunk[2] . 'G'
break
return
endif
endif
endfor
echo 'No more hunks'
endif
endfunction

Expand All @@ -56,10 +57,11 @@ function! gitgutter#hunk#prev_hunk(count)
if hunk_count == a:count
let target = hunk[2] == 0 ? 1 : hunk[2]
execute 'normal!' target . 'G'
break
return
endif
endif
endfor
echo 'No previous hunks'
endif
endfunction

Expand Down

0 comments on commit 275d598

Please sign in to comment.