#NEWLINE# def check_history( window ) : #NEWLINE# #INDENT# if ( VHIST not in window . vars ) : #NEWLINE# #INDENT# bufnr = vim . current . buffer . number #NEWLINE# history = [ r . number for r in vim . buffers if ( r . number != bufnr ) ] #NEWLINE# history . reverse ( ) #NEWLINE# history . insert ( 0 , bufnr ) #NEWLINE# window . vars [ VHIST ] = history