ZyX_I avatar ZyX_I committed db58a7e

@/history: Fixed checker for altervars special

Comments (0)

Files changed (3)

plugin/frawor/fwc/compiler.vim

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

plugin/frawor/fwc/parser.vim

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

plugin/frawor/history.vim

     return r
 endfunction
 "▶1 history.clear :: htype → + history
-function s:history.clear(htype)
-    while histdel(a:htype, -1) | endwhile
-endfunction
+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
 endfunction
 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.