* Navigate up in search history (terminal-like) * @param {string} currentValue Current input value * @returns {string} Previous history item or current value
(currentValue)
| 86 | * @returns {string} Previous history item or current value |
| 87 | */ |
| 88 | navigateSearchUp(currentValue) { |
| 89 | if (this.history.length === 0) return currentValue; |
| 90 | |
| 91 | // Store current value if we're at the beginning |
| 92 | if (this.searchIndex === -1) { |
| 93 | this.tempSearchValue = currentValue; |
| 94 | this.searchIndex = this.history.length - 1; |
| 95 | } else if (this.searchIndex > 0) { |
| 96 | this.searchIndex--; |
| 97 | } |
| 98 | |
| 99 | return this.history[this.searchIndex] || currentValue; |
| 100 | } |
| 101 | |
| 102 | /** |
| 103 | * Navigate down in search history (terminal-like) |
no outgoing calls
no test coverage detected