Commits

Meikel Brandmeyer committed 1c6efc8

Add isA method to Objects

Comments (0)

Files changed (1)

vim/autoload/vimclojure.vim

 function! vimclojure#Object.Init() dict
 endfunction
 
+function! vimclojure#Object.isA(type) dict
+	return self.prototype is a:type
+endfunction
+
 let vimclojure#Buffer = copy(vimclojure#Object)
 let vimclojure#Buffer["__superObjectNew"]  = vimclojure#Buffer["New"]
 let vimclojure#Buffer["__superObjectInit"] = vimclojure#Buffer["Init"]
 	if exists("t:vimclojure_result_window")
 		call t:vimclojure_result_window.goHere()
 
-		if t:vimclojure_result_window._buffer.prototype != a:buftype
+		if !t:vimclojure_result_window._buffer.isA(a:buftype)
 			let t:vimclojure_result_window._buffer = a:buftype.New()
 		else
 			call t:vimclojure_result_window.clear()