Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/diff/position.rb')
-rw-r--r--lib/gitlab/diff/position.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gitlab/diff/position.rb b/lib/gitlab/diff/position.rb
index e43f301c280..74c33c46598 100644
--- a/lib/gitlab/diff/position.rb
+++ b/lib/gitlab/diff/position.rb
@@ -19,6 +19,7 @@ module Gitlab
:height,
:x,
:y,
+ :line_range,
:position_type, to: :formatter
# A position can belong to a text line or to an image coordinate
@@ -167,6 +168,12 @@ module Gitlab
end
end
+ def multiline?
+ return unless on_text? && line_range
+
+ line_range['start'] != line_range['end']
+ end
+
private
def find_diff_file(repository)