@lvce-editor/quick-pick-worker 4.22.1 → 4.22.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1959,7 +1959,7 @@ const getScrollBarTop = (state, scrollBarHeight) => {
1959
1959
  const getRelativePointerY = (state, clientY) => {
1960
1960
  return clientY - state.top - state.headerHeight;
1961
1961
  };
1962
- const setDeltaY = async (state, deltaY) => {
1962
+ const setDeltaY = async (state, deltaY, force = false) => {
1963
1963
  object(state);
1964
1964
  number(deltaY);
1965
1965
  const {
@@ -1976,17 +1976,18 @@ const setDeltaY = async (state, deltaY) => {
1976
1976
  } else if (deltaY > finalDeltaY) {
1977
1977
  deltaY = Math.max(finalDeltaY, 0);
1978
1978
  }
1979
- if (state.deltaY === deltaY) {
1979
+ if (state.deltaY === deltaY && !force) {
1980
1980
  return state;
1981
1981
  }
1982
1982
  const minLineY = Math.round(deltaY / itemHeight);
1983
1983
  const maxLineY = minLineY + Math.round(listHeight / itemHeight);
1984
1984
  number(minLineY);
1985
1985
  number(maxLineY);
1986
+ const fileIconCache = force ? {} : state.fileIconCache;
1986
1987
  const {
1987
1988
  icons,
1988
1989
  newFileIconCache
1989
- } = await getQuickPickFileIcons(items.slice(minLineY, maxLineY), state.fileIconCache);
1990
+ } = await getQuickPickFileIcons(items.slice(minLineY, maxLineY), fileIconCache);
1990
1991
  return {
1991
1992
  ...state,
1992
1993
  deltaY,
@@ -3188,7 +3189,7 @@ const getPicksGoToColumn = async value => {
3188
3189
  direntType: 0,
3189
3190
  fileIcon: '',
3190
3191
  icon: '',
3191
- label: pressEnterToGoToLine(position.row, position.column),
3192
+ label: pressEnterToGoToLine(position.row + 1, position.column + 1),
3192
3193
  matches: [],
3193
3194
  uri: ''
3194
3195
  }];
@@ -3245,7 +3246,7 @@ const getPicks$a = async value => {
3245
3246
  direntType: 0,
3246
3247
  fileIcon: '',
3247
3248
  icon: '',
3248
- label: pressEnterToGoToLine(position.rowIndex, position.columnIndex),
3249
+ label: pressEnterToGoToLine(position.rowIndex + 1, position.columnIndex + 1),
3249
3250
  matches: [],
3250
3251
  uri: ''
3251
3252
  }];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/quick-pick-worker",
3
- "version": "4.22.1",
3
+ "version": "4.22.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/lvce-editor/quick-pick-worker.git"