mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-97080 There is no popup menu on annotation gutter if file is short
show annotation actions popup no matter where on gutter
This commit is contained in:
+1
-1
@@ -1375,7 +1375,7 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse
|
||||
final List<AnAction> addActions = new ArrayList<AnAction>();
|
||||
final Point p = e.getPoint();
|
||||
int line = myEditor.yPositionToLogicalLine((int)p.getY());
|
||||
if (line >= myEditor.getDocument().getLineCount()) return;
|
||||
//if (line >= myEditor.getDocument().getLineCount()) return;
|
||||
|
||||
for (TextAnnotationGutterProvider gutterProvider : myTextAnnotationGutters) {
|
||||
final List<AnAction> list = gutterProvider.getPopupActions(line, myEditor);
|
||||
|
||||
@@ -80,7 +80,9 @@ class ShowDiffFromAnnotation extends AnAction implements LineNumberListener {
|
||||
|
||||
@Override
|
||||
public void update(AnActionEvent e) {
|
||||
e.getPresentation().setVisible(myEnabled && getActualLineNumber() >= 0);
|
||||
final int number = getActualLineNumber();
|
||||
e.getPresentation().setVisible(myEnabled);
|
||||
e.getPresentation().setEnabled(myEnabled && number >= 0 && number < myFileAnnotation.getLineCount());
|
||||
}
|
||||
|
||||
private int getActualLineNumber() {
|
||||
|
||||
Reference in New Issue
Block a user