From d3583328131d2d8b0f9f18ab4c9943c4b99b8ee7 Mon Sep 17 00:00:00 2001
From: Letitia Li <leli@enst.fr>
Date: Fri, 2 Oct 2015 11:10:02 +0000
Subject: [PATCH] Removed scroll bug

---
 src/ui/window/JDialogPragma.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/ui/window/JDialogPragma.java b/src/ui/window/JDialogPragma.java
index f0f336973e..df97fcfa0d 100755
--- a/src/ui/window/JDialogPragma.java
+++ b/src/ui/window/JDialogPragma.java
@@ -129,6 +129,9 @@ public class JDialogPragma extends javax.swing.JDialog implements ActionListener
 
 	
         public boolean insertSelection() {
+	    if (!popupMenu.isVisible()){
+		return false;
+	    }
             if (list.getSelectedValue() != null) {
                 try {
                     final String selectedSuggestion = ((String) list.getSelectedValue()).substring(subWord.length());
@@ -270,7 +273,11 @@ public class JDialogPragma extends javax.swing.JDialog implements ActionListener
 
             @Override
             public void keyPressed(KeyEvent e) {
-
+		if (e.getKeyCode() == KeyEvent.VK_DOWN && suggestion != null) {
+                   e.consume();
+                } else if (e.getKeyCode() == KeyEvent.VK_UP && suggestion != null) {
+                    e.consume();
+                } 
             }
         });
 
-- 
GitLab