Sha256: 1f8c6941a770a6883001b82546339232cb6efcd8b79b3d906891431d827f329b

Contents?: true

Size: 423 Bytes

Versions: 38

Compression:

Stored size: 423 Bytes

Contents

module Redcar
  class AutoCompleter
    class ListDialog < Redcar::ModelessListDialog

      def initialize(prefix,document)
        super()
        @prefix = prefix
        @doc = document
      end

      def selected(index)
        if text = select(index)
          offset = @doc.cursor_offset - @prefix.length
          @doc.replace(offset, @prefix.length, text)
          close
        end
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 2 rubygems

Version Path
redcar-0.13 plugins/auto_completer/lib/auto_completer/list_dialog.rb
redcar-dev-0.13.5dev plugins/auto_completer/lib/auto_completer/list_dialog.rb
redcar-dev-0.13.4dev plugins/auto_completer/lib/auto_completer/list_dialog.rb
redcar-dev-0.13.3dev plugins/auto_completer/lib/auto_completer/list_dialog.rb
redcar-dev-0.13.2dev plugins/auto_completer/lib/auto_completer/list_dialog.rb
redcar-dev-0.13.1dev plugins/auto_completer/lib/auto_completer/list_dialog.rb
redcar-0.12.1 plugins/auto_completer/lib/auto_completer/list_dialog.rb
redcar-dev-0.13.0dev plugins/auto_completer/lib/auto_completer/list_dialog.rb
redcar-0.12 plugins/auto_completer/lib/auto_completer/list_dialog.rb
redcar-dev-0.12.27dev plugins/auto_completer/lib/auto_completer/list_dialog.rb
redcar-dev-0.12.26dev plugins/auto_completer/lib/auto_completer/list_dialog.rb
redcar-dev-0.12.25dev plugins/auto_completer/lib/auto_completer/list_dialog.rb
redcar-dev-0.12.24dev plugins/auto_completer/lib/auto_completer/list_dialog.rb
redcar-dev-0.12.23dev plugins/auto_completer/lib/auto_completer/list_dialog.rb
redcar-dev-0.12.22dev plugins/auto_completer/lib/auto_completer/list_dialog.rb
redcar-dev-0.12.21dev plugins/auto_completer/lib/auto_completer/list_dialog.rb
redcar-dev-0.12.20dev plugins/auto_completer/lib/auto_completer/list_dialog.rb
redcar-dev-0.12.19dev plugins/auto_completer/lib/auto_completer/list_dialog.rb
redcar-dev-0.12.18dev plugins/auto_completer/lib/auto_completer/list_dialog.rb
redcar-dev-0.12.17dev plugins/auto_completer/lib/auto_completer/list_dialog.rb