fix previous commit
Support simple character deletion operations in StructuredTextTarget.h to support opcode suffix modification.
This commit is contained in:
@@ -47,7 +47,12 @@ void FunctionViewWidget::prtt(const QString &s)
|
||||
collected_text+=s;
|
||||
//collected_text+="<br>";
|
||||
}
|
||||
|
||||
void FunctionViewWidget::delChars(int v) {
|
||||
assert(v>0);
|
||||
collected_text = collected_text.remove(collected_text.size()-v,v);
|
||||
while(v--)
|
||||
m_doc_cursor->deletePreviousChar();
|
||||
}
|
||||
void FunctionViewWidget::addEOL()
|
||||
{
|
||||
m_doc_cursor->insertBlock(m_current_format);
|
||||
|
||||
@@ -35,6 +35,7 @@ public:
|
||||
void addEOL() override;
|
||||
void TAGbegin(enum TAG_TYPE tag_type, void * p);
|
||||
void TAGend(enum TAG_TYPE tag_type);
|
||||
void delChars(int v);
|
||||
|
||||
|
||||
private slots:
|
||||
|
||||
@@ -6,6 +6,7 @@ public:
|
||||
virtual void TAGbegin(TAG_TYPE t,void *data)=0;
|
||||
virtual void TAGend(TAG_TYPE t)=0;
|
||||
virtual void prtt(const QString &v)=0;
|
||||
virtual void delChars(int v) = 0;
|
||||
|
||||
virtual void addEOL() = 0; // some targets might want to disable newlines
|
||||
void addSpace(int n=1) {
|
||||
|
||||
Reference in New Issue
Block a user