Use gettabwinvar to fix handling buffers opened in multiple tabs