vim-web 0.3.44-dev.15 → 0.3.44-dev.16

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.
package/dist/vim-web.js CHANGED
@@ -75872,19 +75872,15 @@ function useSectionBox(adapter) {
75872
75872
  const boxRef = useRef(adapter.getBox());
75873
75873
  enable.useOnChange((v) => {
75874
75874
  visible2.set(v);
75875
- auto.set(false);
75876
75875
  showOffsetPanel.set(false);
75877
- topOffset.set("1");
75878
- sideOffset.set("1");
75879
- bottomOffset.set("1");
75880
- void sectionReset.call();
75876
+ if (v && auto.get()) {
75877
+ sectionSelection.call();
75878
+ } else {
75879
+ sectionReset.call();
75880
+ }
75881
75881
  });
75882
- auto.useValidate((v) => v && enable.get());
75883
75882
  visible2.useValidate((v) => enable.get() && v);
75884
75883
  showOffsetPanel.useValidate((v) => enable.get() && v);
75885
- topOffset.useValidate((v) => enable.get() ? sanitize(v, false) : "1");
75886
- sideOffset.useValidate((v) => enable.get() ? sanitize(v, false) : "1");
75887
- bottomOffset.useValidate((v) => enable.get() ? sanitize(v, false) : "1");
75888
75884
  topOffset.useConfirm((v) => sanitize(v, true));
75889
75885
  sideOffset.useConfirm((v) => sanitize(v, true));
75890
75886
  bottomOffset.useConfirm((v) => sanitize(v, true));
@@ -75897,7 +75893,7 @@ function useSectionBox(adapter) {
75897
75893
  visible2.useOnChange((v) => adapter.setVisible(v));
75898
75894
  useEffect(() => {
75899
75895
  return adapter.onSelectionChanged.sub(() => {
75900
- if (auto.get()) sectionSelection.call();
75896
+ if (auto.get() && enable.get()) sectionSelection.call();
75901
75897
  });
75902
75898
  }, []);
75903
75899
  const section = useArgActionRef((baseBox) => {