switch searchHistory
This commit is contained in:
parent
f4eb1aef7d
commit
50f1beb1e9
1 changed files with 13 additions and 2 deletions
|
|
@ -335,12 +335,23 @@ class Ex
|
||||||
|
|
||||||
[pattern, substition, flags] = parsed
|
[pattern, substition, flags] = parsed
|
||||||
if pattern is ''
|
if pattern is ''
|
||||||
|
if vimState.getSearchHistoryItem?
|
||||||
|
# vim-mode
|
||||||
pattern = vimState.getSearchHistoryItem()
|
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
|
||||||
|
if vimState.pushSearchHistory?
|
||||||
|
# vim-mode
|
||||||
vimState.pushSearchHistory(pattern)
|
vimState.pushSearchHistory(pattern)
|
||||||
|
else if vimState.searchHistory?
|
||||||
|
#vim-mode-plus
|
||||||
|
vimState.searchHistory.save(pattern)
|
||||||
|
|
||||||
try
|
try
|
||||||
flagsObj = {}
|
flagsObj = {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue