Fixed ugly bug in RichEdit (problem deleting paragraph inside table)

git-svn-id: svn://ultimatepp.org/upp/trunk@552 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2008-10-20 10:36:42 +00:00
commit 176e6522bf
10 changed files with 46 additions and 31 deletions

View file

@ -1,8 +1,14 @@
#include "ide.h"
#define LDUMP(x) // DDUMP(x)
#define LDUMPC(x) // DDUMPC(x)
#define LLOG(x) // DLOG(x)
#if 0
#define LDUMP(x) DDUMP(x)
#define LDUMPC(x) DDUMPC(x)
#define LLOG(x) DLOG(x)
#else
#define LDUMP(x)
#define LDUMPC(x)
#define LLOG(x)
#endif
class IndexSeparatorFrameCls : public CtrlFrame {
virtual void FrameLayout(Rect& r) { r.right -= 1; }
@ -160,6 +166,8 @@ String AssistEditor::CompleteIdBack(int& q)
id = "::" + id;
}
else {
if(iscib(*id))
break;
String nid = IdBack(q);
if(IsNull(nid))
break;
@ -298,10 +306,11 @@ void AssistEditor::Assist()
if(Ch(q - 1) == '(') {
--q;
String id = IdBack(q);
if(id == "THISBACK")
if(id == "THISBACK") {
GatherItems(parser.current_scope, false, in_types, false, true);
PopUpAssist();
}
}
else
if(Ch(q - 1) == ':') {
while(Ch(q - 1) == ':')
q--;
@ -324,13 +333,13 @@ void AssistEditor::Assist()
GatherItems("", false, in_types2, true, false);
}
}
if(assist_item.GetCount() == 0)
return;
PopUpAssist();
}
void AssistEditor::PopUpAssist(bool auto_insert)
{
if(assist_item.GetCount() == 0)
return;
int lcy = max(16, BrowserFont().Info().GetHeight());
type.Clear();
type.Add(AttrText("<all>").Ink(SColorHighlight()));
@ -513,9 +522,7 @@ bool AssistEditor::Key(dword key, int count)
else
if(auto_assist && InCode()) {
if(key == '.' || key == '>' && Ch(GetCursor() - 2) == '-' ||
key == ':' && Ch(GetCursor() - 2) == ':')
Assist();
if(key == '(')
key == ':' && Ch(GetCursor() - 2) == ':' || key == '(')
Assist();
}
if(key == ',') {