jisaacks / GitGutter

A Sublime Text 2/3 plugin to see git diff in gutter
MIT License
3.87k stars 224 forks source link

What is supposed to be insert icon instead is modify icon. #564

Closed LollipopFt closed 3 years ago

LollipopFt commented 3 years ago

Description

When I add a new line, modify icon is displayed instead of insert icon. https://user-images.githubusercontent.com/62802897/121004990-e6d0ef00-c7c1-11eb-965f-94df82e0692d.mp4 As can be seen, delete icon works as expected, but modify icon appears for both inserted lines and modified lines.

Support Info

Sublime Text 4107 Platform: windows Arch: x64 GitGutter 1.11.5 Install via PC: True git version 2.31.1.windows.1 mdpopups 4.1.2 markdown 3.2.2 pygments 2.1a0 jinja2 2.10.1

Steps to Reproduce Issue

  1. Insert a line
  2. Watch as modify icon appears
deathaxe commented 3 years ago

Duplicate of #345

The first manipulated line at the end of the file contains }, which means adding some extra chars creates a "modified hunk". Git interprets all following lines added as "belonging to this hunk". This is the way git works. GitGutter just interprets the output of git diff and adds gutter icons accordingly.