switch searchHistory

This commit is contained in:
mkiken 2017-03-20 13:49:33 +09:00
parent f4eb1aef7d
commit 50f1beb1e9

View file

@ -335,12 +335,23 @@ class Ex
[pattern, substition, flags] = parsed [pattern, substition, flags] = parsed
if pattern is '' if pattern is ''
pattern = vimState.getSearchHistoryItem() if vimState.getSearchHistoryItem?
# vim-mode
pattern = vimState.getSearchHistoryItem()
else if vimState.searchHistory?
#vim-mode-plus
pattern = vimState.searchHistory.get('prev')
if not pattern? if not pattern?
atom.beep() atom.beep()
throw new CommandError('No previous regular expression') throw new CommandError('No previous regular expression')
else else
vimState.pushSearchHistory(pattern) if vimState.pushSearchHistory?
# vim-mode
vimState.pushSearchHistory(pattern)
else if vimState.searchHistory?
#vim-mode-plus
vimState.searchHistory.save(pattern)
try try
flagsObj = {} flagsObj = {}