text insert bug fix

This commit is contained in:
Manindra Moharana
2013-07-06 00:59:09 +05:30
parent f90f8b56f4
commit 2664668d24
3 changed files with 30 additions and 48 deletions

View File

@@ -98,8 +98,9 @@ public class CompletionPanel {
public boolean insertSelection() {
if (completionList.getSelectedValue() != null) {
try {
final String selectedSuggestion = ((CompletionCandidate) completionList
String selectedSuggestion = ((CompletionCandidate) completionList
.getSelectedValue()).getCompletionString().substring(subWord.length());
System.err.println(subWord+" <= subword,Inserting suggestion=> " + selectedSuggestion);
textarea.getDocument().insertString(insertionPosition,
selectedSuggestion, null);
textarea.setCaretPosition(insertionPosition