* Navigate down in search history (terminal-like) * @param {string} currentValue Current input value * @returns {string} Next history item or original value
(currentValue)
| 105 | * @returns {string} Next history item or original value |
| 106 | */ |
| 107 | navigateSearchDown(currentValue) { |
| 108 | if (this.history.length === 0 || this.searchIndex === -1) { |
| 109 | return currentValue; |
| 110 | } |
| 111 | |
| 112 | this.searchIndex++; |
| 113 | |
| 114 | // If we've gone past the end, return to original value |
| 115 | if (this.searchIndex >= this.history.length) { |
| 116 | this.searchIndex = -1; |
| 117 | return this.tempSearchValue; |
| 118 | } |
| 119 | |
| 120 | return this.history[this.searchIndex]; |
| 121 | } |
| 122 | |
| 123 | /** |
| 124 | * Navigate up in replace history (terminal-like) |
no outgoing calls
no test coverage detected