void FileManager::closeBuffer(BufferID id, ScintillaEditView * identifier) { int index = getBufferIndexByID(id); Buffer * buf = getBufferByIndex(index); int refs = buf->removeReference(identifier); if (!refs) { //buffer can be deallocated _pscratchTilla->execute(SCI_RELEASEDOCUMENT, 0, buf->_doc); //release for FileManager, Document is now gone _buffers.erase(_buffers.begin() + index); delete buf; _nrBufs--; } }
BufferID DocTabView::activeBuffer() { int index = getCurrentTabIndex(); return (BufferID)getBufferByIndex(index); }
BufferID DocTabView::activeBuffer() { int index = getCurrentTabIndex(); return static_cast<BufferID>(getBufferByIndex(index)); }