Sha256: 2fec412066e4f4fcb19531a8dd9caeea4d41c323181c0fdd82e5425a00cbcc3b
Contents?: true
Size: 681 Bytes
Versions: 17
Compression:
Stored size: 681 Bytes
Contents
# typed: strict # frozen_string_literal: true module RubyLsp module Requests module Support class SelectionRange < Interface::SelectionRange extend T::Sig sig { params(position: Document::PositionShape).returns(T::Boolean) } def cover?(position) start_covered = range.start.line < position[:line] || (range.start.line == position[:line] && range.start.character <= position[:character]) end_covered = range.end.line > position[:line] || (range.end.line == position[:line] && range.end.character >= position[:character]) start_covered && end_covered end end end end end
Version data entries
17 entries across 17 versions & 2 rubygems