Improved false quote detection
This commit is contained in:
parent
f43822b1c2
commit
4057aba5d0
@ -10,6 +10,8 @@ ______________________________________________________________________
|
|||||||
Notes for GoldED+ 1.1.5, /snapshot/
|
Notes for GoldED+ 1.1.5, /snapshot/
|
||||||
______________________________________________________________________
|
______________________________________________________________________
|
||||||
|
|
||||||
|
+ Improved false quote detection.
|
||||||
|
|
||||||
+ New menu item "Toggle sent" added to "Action" menu that will toggle
|
+ New menu item "Toggle sent" added to "Action" menu that will toggle
|
||||||
sent/unsent state for current or marked messages.
|
sent/unsent state for current or marked messages.
|
||||||
|
|
||||||
|
@ -282,7 +282,7 @@ const word CRC_WT_SELECTACTION = 0xF7C0;
|
|||||||
const word CRC_MI_FORWARDMESSAGE = 0x644C;
|
const word CRC_MI_FORWARDMESSAGE = 0x644C;
|
||||||
const word CRC_MI_MOVEMESSAGE = 0xAB24;
|
const word CRC_MI_MOVEMESSAGE = 0xAB24;
|
||||||
const word CRC_MI_COPYMESSAGE = 0x6811;
|
const word CRC_MI_COPYMESSAGE = 0x6811;
|
||||||
const word CRC_MI_TOGGLESENT = 0;
|
const word CRC_MI_TOGGLESENT = 0x31f9;
|
||||||
const word CRC_MI_QUITCMF = 0xE1B8;
|
const word CRC_MI_QUITCMF = 0xE1B8;
|
||||||
const word CRC_ST_ARE = 0x78C8;
|
const word CRC_ST_ARE = 0x78C8;
|
||||||
const word CRC_ST_IS = 0x27AC;
|
const word CRC_ST_IS = 0x27AC;
|
||||||
|
@ -2702,6 +2702,12 @@ void MsgLineReIndex(GMsg* msg, int viewhidden, int viewkludge, int viewquote) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (line->type & GLINE_TXTH)
|
||||||
|
{
|
||||||
|
*qbuf0 = NUL;
|
||||||
|
qmatches = 0;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
else if(line->type & GLINE_QUOT) {
|
else if(line->type & GLINE_QUOT) {
|
||||||
if(not viewquote) {
|
if(not viewquote) {
|
||||||
GetQuotestr(line->txt.c_str(), qbuf, &qlen);
|
GetQuotestr(line->txt.c_str(), qbuf, &qlen);
|
||||||
|
@ -393,7 +393,7 @@ int GetAkaNo(const ftn_addr& __aka);
|
|||||||
int GetQuotestr(const char* ptr, char* qbuf, uint* qlen);
|
int GetQuotestr(const char* ptr, char* qbuf, uint* qlen);
|
||||||
int cmp_quotes(char* q1, char* q2);
|
int cmp_quotes(char* q1, char* q2);
|
||||||
int is_quote(const char* ptr);
|
int is_quote(const char* ptr);
|
||||||
bool is_quote2(const Line* line, const char* ptr);
|
bool is_quote2(Line* line, const char* ptr);
|
||||||
int IsQuoteChar(const char* s);
|
int IsQuoteChar(const char* s);
|
||||||
void maketitle();
|
void maketitle();
|
||||||
int maketitle_and_status(char *);
|
int maketitle_and_status(char *);
|
||||||
|
@ -373,7 +373,7 @@ int is_quote(const char* ptr) {
|
|||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
bool is_quote2(const Line* line, const char* ptr)
|
bool is_quote2(Line* line, const char* ptr)
|
||||||
{
|
{
|
||||||
if (!CFG->quoteusenewai) return true;
|
if (!CFG->quoteusenewai) return true;
|
||||||
|
|
||||||
@ -410,6 +410,7 @@ bool is_quote2(const Line* line, const char* ptr)
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
// take a look at previous lines
|
// take a look at previous lines
|
||||||
|
Line *paragraph = NULL;
|
||||||
for (Line *ln = line->prev; ln; ln = ln->prev)
|
for (Line *ln = line->prev; ln; ln = ln->prev)
|
||||||
{
|
{
|
||||||
// previous line is quoted?
|
// previous line is quoted?
|
||||||
@ -419,7 +420,14 @@ bool is_quote2(const Line* line, const char* ptr)
|
|||||||
if ((ln->txt.length() == 0) ||
|
if ((ln->txt.length() == 0) ||
|
||||||
(ln->txt[0] == LF) ||
|
(ln->txt[0] == LF) ||
|
||||||
(ln->txt[0] == CR))
|
(ln->txt[0] == CR))
|
||||||
return true;
|
{
|
||||||
|
if (paragraph) return true;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
paragraph = ln;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
// or kludge?
|
// or kludge?
|
||||||
if (ln->txt[0] == CTRL_A)
|
if (ln->txt[0] == CTRL_A)
|
||||||
return true;
|
return true;
|
||||||
@ -439,6 +447,8 @@ bool is_quote2(const Line* line, const char* ptr)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// hide false paragraph
|
||||||
|
if (paragraph) paragraph->type |= GLINE_TXTH;
|
||||||
return false; // don't quote current line
|
return false; // don't quote current line
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,8 @@ const uint GLINE_POSI = 0x0100;
|
|||||||
const uint GLINE_HIGH = 0x0200;
|
const uint GLINE_HIGH = 0x0200;
|
||||||
const uint GLINE_TAGL = 0x0400;
|
const uint GLINE_TAGL = 0x0400;
|
||||||
const uint GLINE_SIGN = 0x0800;
|
const uint GLINE_SIGN = 0x0800;
|
||||||
const uint GLINE_NOAL = 0x1000; // text is not allocated
|
const uint GLINE_TXTH = 0x1000; // text is hiden
|
||||||
|
const uint GLINE_NOAL = 0x2000; // text is not allocated
|
||||||
|
|
||||||
const uint GLINE_KLUDGE = GLINE_HIDD | GLINE_KLUD;
|
const uint GLINE_KLUDGE = GLINE_HIDD | GLINE_KLUD;
|
||||||
const uint GLINE_ALL = GLINE_HIDD | GLINE_KLUD | GLINE_QUOT;
|
const uint GLINE_ALL = GLINE_HIDD | GLINE_KLUD | GLINE_QUOT;
|
||||||
@ -162,6 +163,7 @@ public:
|
|||||||
int isposition() { return !!(type & GLINE_POSI); }
|
int isposition() { return !!(type & GLINE_POSI); }
|
||||||
int ishighlighted() { return !!(type & GLINE_HIGH); }
|
int ishighlighted() { return !!(type & GLINE_HIGH); }
|
||||||
int istagline() { return !!(type & GLINE_TAGL); }
|
int istagline() { return !!(type & GLINE_TAGL); }
|
||||||
|
int istxthidden() { return !!(type & GLINE_TXTH); }
|
||||||
int isheader() { return !!kludge; }
|
int isheader() { return !!kludge; }
|
||||||
|
|
||||||
int isallocated() { return !(type & GLINE_NOAL); }
|
int isallocated() { return !(type & GLINE_NOAL); }
|
||||||
|
Reference in New Issue
Block a user