do not move the cursor to the end when applying a proposal

This commit is contained in:
2018-04-08 14:06:13 +02:00
parent 68ee88bce0
commit 1755562a84
8 changed files with 167 additions and 93 deletions

View File

@@ -161,7 +161,8 @@ public class PdbController implements HardcodedValues {
for (final Proposal proposal : proposals) {
final AutocompleteProposal e = new AutocompleteProposal();
e.setValue(proposal.getProposedTag());
e.setProposedQuery(proposal.getProposedQuery());
e.setNewQuery(proposal.getNewQuery());
e.setNewCaretPosition(proposal.getNewCaretPosition());
result.add(e);
}

View File

@@ -2,7 +2,8 @@ package org.lucares.pdbui.domain;
public class AutocompleteProposal {
private String value;
private String proposedQuery;
private String newQuery;
private int newCaretPosition;
public String getValue() {
return value;
@@ -17,11 +18,19 @@ public class AutocompleteProposal {
return value;
}
public void setProposedQuery(final String proposedQuery) {
this.proposedQuery = proposedQuery;
public int getNewCaretPosition() {
return newCaretPosition;
}
public String getProposedQuery() {
return proposedQuery;
public void setNewCaretPosition(final int newCaretPosition) {
this.newCaretPosition = newCaretPosition;
}
public String getNewQuery() {
return newQuery;
}
public void setNewQuery(final String newQuery) {
this.newQuery = newQuery;
}
}