@Override
      public void itemSelected(@NotNull LookupEvent event) {
        if (isCaretOutsideCurrentSegment(null)) {
          if (isCaretInsideOrBeforeNextVariable()) {
            nextTab();
          }
          else {
            gotoEnd(true);
          }
        }
      }
@Override
      public void itemSelected(@NotNull LookupEvent event)