Skip to content

Commit

Permalink
ambigious timeout slowing down backout
Browse files Browse the repository at this point in the history
  • Loading branch information
slorello89 committed May 12, 2023
1 parent 6bab45c commit 11ea3e1
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@
import org.springframework.shell.component.support.*;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StopWatch;
import org.springframework.util.StringUtils;

import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Function;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -120,6 +118,7 @@ protected List<I> getItems() {

@Override
protected void bindKeyMap(KeyMap<String> keyMap) {
keyMap.setAmbiguousTimeout(1);
keyMap.bind(OPERATION_DOWN, ctrl('E'), key(getTerminal(), InfoCmp.Capability.key_down));
keyMap.bind(OPERATION_UP, ctrl('Y'), key(getTerminal(), InfoCmp.Capability.key_up));
keyMap.bind(OPERATION_EXIT, "\r");
Expand Down Expand Up @@ -148,7 +147,6 @@ protected C runInternal(C context) {

@Override
protected boolean read(BindingReader bindingReader, KeyMap<String> keyMap, C context) {

String operation = bindingReader.readBinding(keyMap);
if(Objects.equals(operation, OPERATION_ESCAPE)){
escapeMode = true;
Expand Down

0 comments on commit 11ea3e1

Please sign in to comment.