getNextColumn = function getNextColumn(col) {
        var visualColumn = col;

        var physicalColumn = _this6.hot.toPhysicalColumn(visualColumn);

        if (_this6.isHidden(physicalColumn, true)) {
          if (_this6.lastSelectedColumn > visualColumn || coords.col === columnCount - 1) {
            if (visualColumn > 0) {
              visualColumn -= 1;
              visualColumn = getNextColumn(visualColumn);
            } else {
              (0, _number.rangeEach)(0, _this6.lastSelectedColumn, function (i) {
                if (!_this6.isHidden(i)) {
                  visualColumn = i;
                  return false;
                }
              });
            }
          } else {
            visualColumn += 1;
            visualColumn = getNextColumn(visualColumn);
          }
        }

        return visualColumn;
      }
On before set range end listener.

@private
@param {Object} coords Object with `row` and `col` properties.