Module: Textbringer::MinibufferHistory
- Defined in:
- lib/textbringer/minibuffer_extension/history.rb
Class Method Summary collapse
Class Method Details
.add(name, value) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/textbringer/minibuffer_extension/history.rb', line 15 def add(name, value) return if value.nil? || value.empty? list = MINIBUFFER_HISTORY[name] list.delete(value) if CONFIG[:history_delete_duplicates] list.unshift(value) list.pop while list.size > CONFIG[:history_length] end |
.get(name) ⇒ Object
11 12 13 |
# File 'lib/textbringer/minibuffer_extension/history.rb', line 11 def get(name) MINIBUFFER_HISTORY[name] end |