mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-25 14:22:54 -06:00
ide: Assist fix for ->
This commit is contained in:
parent
075b16fcd9
commit
ea5a7014d9
3 changed files with 7 additions and 5 deletions
|
|
@ -893,7 +893,7 @@ void Union(Vector<Rect>& rr, const Rect& add);
|
|||
|
||||
Vector<Rect> Intersection(const Vector<Rect>& b, const Rect& a);
|
||||
|
||||
void AddRefreshRect(Vector<Rect>& invalid, const Rect& _r);
|
||||
void AddRefreshRect(Vector<Rect>& invalid, const Rect& _r, double ctolerance = 2);
|
||||
|
||||
void DrawDragFrame(Draw& w, const Rect& r, int n, const int *pattern, Color color, int animation);
|
||||
void DrawDragFrame(Draw& w, const Rect& r, int n, int pattern, Color color, int animation);
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ Vector<Rect> Intersection(const Vector<Rect>& b, const Rect& a)
|
|||
return Intersect(b, a, dummy);
|
||||
}
|
||||
|
||||
void AddRefreshRect(Vector<Rect>& invalid, const Rect& _r)
|
||||
void AddRefreshRect(Vector<Rect>& invalid, const Rect& _r, double ctolerance)
|
||||
{
|
||||
Vector<Rect> inv;
|
||||
Rect r = _r;
|
||||
|
|
@ -102,7 +102,7 @@ void AddRefreshRect(Vector<Rect>& invalid, const Rect& _r)
|
|||
for(int i = 0; i < invalid.GetCount(); i++) {
|
||||
const Rect& ir = invalid[i];
|
||||
Rect ur = r | ir;
|
||||
if(ur.Width() * ur.Height() < 2 * (ir.Width() * ir.Height() + ra))
|
||||
if(ur.Width() * ur.Height() < ctolerance * (ir.Width() * ir.Height() + ra))
|
||||
r = ur;
|
||||
else
|
||||
if(!r.Contains(ir))
|
||||
|
|
|
|||
|
|
@ -1059,8 +1059,10 @@ bool AssistEditor::Key(dword key, int count)
|
|||
else
|
||||
if(auto_assist) {
|
||||
if(InCode()) {
|
||||
if(key == '.' || key == '>' && Ch(GetCursor32() - 2) == '-' ||
|
||||
key == ':' && Ch(GetCursor32() - 2) == ':') {
|
||||
if(key == '>' && Ch(GetCursor32() - 2) == '-' || key == ':' && Ch(GetCursor32() - 2) == ':')
|
||||
Assist(false);
|
||||
else
|
||||
if(key == '.') {
|
||||
String id;
|
||||
int pos = GetCursor() - 2;
|
||||
int n = 50;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue