Method: Overlay.face

Defined in:
lib/xiki/overlay.rb

.face(face, options = {}) ⇒ Object

Code Sample: Overlay.face :trailing_whitespace, :what=>:line Apply face to region



80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/xiki/overlay.rb', line 80

def self.face(face, options={})
  left ||= options[:left]
  right ||= options[:right]
  if options[:what] == :line or left.nil?
    left, right = Line.left, Line.right+1
  end

  o = Overlay.find_or_make(left, right)
  o[:face] = face
  o
  nil
end