sublime-text-git
sublime-text-git copied to clipboard
Fix goto diff for single line only (base on Git 2.10.0).
issue #493
like:
--- a/hello.txt +++ b/hello.txt @@ -1 +1,2 @@ -hello world! \ No newline at end of file + hello world! + new line \ No newline at end of file
--- a/hello.txt +++ b/hello.txt @@ -1,2 +1 @@ - hello world! new line \ No newline at end of file
--- a/hello.txt +++ b/hello.txt @@ -1 +1 @@ -hello world! \ No newline at end of file + new line \ No newline at end of file
Hi, @kemayo
I sincerely hope you can take the time to look at my problem and try to merge it.
Sometimes the displayed text of diff with single line. Then the line header looks like the following, @@ -1 +1,2 @@ @@ -1,2 +1 @@ @@ -1 +1 @@
In that case, press Enter Key on that - or + lines. Dump error message:
No hunk info
I observed single line mark looks like xx and multiple lines mark looks like xx,xx So I updated the regular text pattern to fit it. from: "^@@ -(\d+),(\d+) +(\d+),(\d+) @@." to: "^@@ -(\d+)(,(\d+))? +(\d+)(,(\d+))? @@."
I hope this fix will help this plugin to make better use of Git.
Thanks wategear