mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
second completion: just don't restore prefix if we can't (EA-64214 - NA: LookupOffsets.getLookupStart)
This commit is contained in:
@@ -1027,7 +1027,7 @@ public class LookupImpl extends LightweightHint implements LookupEx, Disposable,
|
||||
}
|
||||
|
||||
public void restorePrefix() {
|
||||
myOffsets.restorePrefix(getLookupStart());
|
||||
myOffsets.restorePrefix();
|
||||
}
|
||||
|
||||
private static String staticDisposeTrace = null;
|
||||
|
||||
@@ -143,10 +143,10 @@ public class LookupOffsets extends DocumentAdapter {
|
||||
myRemovedPrefix = 0;
|
||||
}
|
||||
|
||||
void restorePrefix(int lookupStart) {
|
||||
if (myInitialPrefix != null) {
|
||||
myEditor.getDocument().replaceString(lookupStart, myEditor.getCaretModel().getOffset(), myInitialPrefix);
|
||||
}
|
||||
void restorePrefix() {
|
||||
if (myInitialPrefix == null || !myLookupStartMarker.isValid()) return;
|
||||
|
||||
myEditor.getDocument().replaceString(myLookupStartMarker.getStartOffset(), myEditor.getCaretModel().getOffset(), myInitialPrefix);
|
||||
}
|
||||
|
||||
void disposeMarkers() {
|
||||
|
||||
Reference in New Issue
Block a user