teditor  1.8.0@@fee5e94
Terminal based editor written in C++
Functions
Internal operations associated with undo/redo stack

Functions

void teditor::Buffer::applyInsertOp (OpData &op, bool pushToStack=true)
 Insert characters into the buffer. More...
 
void teditor::Buffer::applyDeleteOp (OpData &op)
 Delete characters/regions from the buffer. More...
 
void teditor::Buffer::addLines (const RemovedLines &rlines)
 
void teditor::Buffer::removeLines (const RemovedLines &rlines)
 
void teditor::Buffer::pushNewOp (OpData &op)
 
void teditor::Buffer::clearStack (OpStack &st)
 

Detailed Description

Function Documentation

◆ addLines()

void teditor::Buffer::addLines ( const RemovedLines rlines)
protected

add the previously removed lines back into the buffer

◆ applyDeleteOp()

void teditor::Buffer::applyDeleteOp ( OpData op)
protected

Delete characters/regions from the buffer.

Parameters
opthe info on what, how and where to delete from

◆ applyInsertOp()

void teditor::Buffer::applyInsertOp ( OpData op,
bool  pushToStack = true 
)
protected

Insert characters into the buffer.

Parameters
opthe info on what, how and where to insert
pushToStackwhether to push this op into the 'undoStack'

◆ clearStack()

void teditor::Buffer::clearStack ( OpStack st)
protected

clear the input stack (esp useful while clearing redo stack)

◆ pushNewOp()

void teditor::Buffer::pushNewOp ( OpData op)
protected

pushing a new op onto the undo stack. It has the side-effect of clearing the redo stack so far accumulated!

◆ removeLines()

void teditor::Buffer::removeLines ( const RemovedLines rlines)
protected

remove the lines as part of the redo operation on keepRemoveLines