mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 06:05:58 -06:00
ide: Usage behaviour improved
This commit is contained in:
parent
62a2e94d9f
commit
4c6cdaf417
2 changed files with 18 additions and 2 deletions
|
|
@ -62,8 +62,24 @@ String Ide::GetRefId(int pos, String& name, Point& ref_pos)
|
|||
ci = m.pos.x;
|
||||
}
|
||||
}
|
||||
AnnotationItem cm = editor.FindCurrentAnnotation();
|
||||
if(cm.pos.y == li && cm.pos.x <= lp && cm.pos.x >= ci && cm.name == name) {
|
||||
ref_id = cm.id;
|
||||
ref_pos = cm.pos;
|
||||
}
|
||||
|
||||
if(IsFunction(cm.kind))
|
||||
for(const AnnotationItem& m : editor.locals) {
|
||||
if(m.pos.y == li && m.pos.x <= lp && m.pos.x >= ci && m.name == name) {
|
||||
ref_id = m.id;
|
||||
ref_pos = m.pos;
|
||||
ci = m.pos.x;
|
||||
}
|
||||
}
|
||||
|
||||
if(ref_id.GetCount())
|
||||
editor.FromUtf8x(ref_pos);
|
||||
|
||||
return ref_id;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -102,8 +102,8 @@ KEY(DCOPY, "Copy as definition/declaration", K_ALT_C)
|
|||
KEY(VIRTUALS, "Virtual methods..", K_ALT_V)
|
||||
KEY(THISBACKS, "Events..", K_ALT_T)
|
||||
KEY(SWAPS, "Go to definition/declaration", K_ALT_I)
|
||||
KEY(USAGE, "Find current entity usage", K_ALT_U)
|
||||
KEY(IDUSAGE, "Find symbol usage", K_SHIFT|K_ALT_U)
|
||||
KEY(IDUSAGE, "Usage", K_ALT_U)
|
||||
KEY(USAGE, "Usage of current function", K_SHIFT|K_ALT_U)
|
||||
KEY(JUMPS, "Context go to", K_ALT_J)
|
||||
KEY(CLEARMARKERSFILE, "Remove change markers in file", K_ALT_R)
|
||||
KEY(CLEARMARKERSALL, "Remove all change markers", K_SHIFT|K_ALT_R)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue