ZyX_I avatar ZyX_I committed db58a7e

@/history: Fixed checker for altervars special

Comments (0)

Files changed (3)


         call self.increment(self.vstrs[-1], vstr)
         call add(self.vstinf[self.vstrs[-1]], ['inc', vstr])
+    unlet self.vstinf[vstr]
     return self
 "▶1 addjoinedmtchs  :: &self


     if !empty(self.ungot)
         call self.throw('int', 'regungetc')
-    if a:endstr=~#'^\w'
+    if a:endstr=~#'\v^\w'
         call self.throw('wordend', a:endstr)
     let c=matchstr(self.s, '\v(\\.|[^\\'.escape(a:endstr, '\]^-').'])+'.


     return r
 "▶1 history.clear :: htype → + history
-function s:history.clear(htype)
-    while histdel(a:htype, -1) | endwhile
+let s:history.clear=function('histdel')
 "▶1 history.set :: htype, [String] → + history
 function s:history.set(htype, histlines)
     call s:history.clear(a:htype)
 "▶1 Post resource
 call s:_f.postresource('history', s:history)
 "▶1 Create altspecial
+let s:histtypes=['input', '@', 'expr', '=', 'cmd', ':', 'search', '/']
 function s:F.histchecker(arg)
-    try
-        return histnr(a:arg[0])!=-1
-    catch
-        return 0
-    endtry
+    return index(s:histtypes, a:arg[0])!=-1
 function s:F.histset(histlines, htype)
     return s:history.set(a:htype, a:histlines)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.