verup
Add global lock and change buffer lock to window lock