aleman 1.6.1 → 1.6.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.
package/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ 2025.09.12, v1.6.2
2
+
3
+ fix:
4
+ - acc7a86 aleman: menu: vim: gg: showSubmenu
5
+
1
6
  2025.09.12, v1.6.1
2
7
 
3
8
  fix:
@@ -14,18 +14,18 @@ export const listener = ({state, options}) => {
14
14
 
15
15
  const menuValues = Object.values(menu);
16
16
 
17
- if (insideSubmenu && submenuIndex > 0)
18
- submenuIndex = 0;
19
-
20
- if (!insideSubmenu)
21
- index = menuValues.length - 1;
22
-
23
17
  const submenu = getSubmenu({
24
18
  index,
25
19
  options,
26
20
  });
27
21
 
28
22
  const submenuCount = Object.keys(submenu).length;
23
+
24
+ if (insideSubmenu)
25
+ submenuIndex = submenuCount - 1;
26
+ else
27
+ index = menuValues.length - 1;
28
+
29
29
  const showSubmenu = submenuCount > 0;
30
30
 
31
31
  return {
@@ -24,11 +24,20 @@ const createListener = (buffer) => ({event, state, options}) => {
24
24
 
25
25
  if (buffer[0] === 'g' && key === 'g') {
26
26
  buffer = [];
27
+ const {
28
+ insideSubmenu,
29
+ index,
30
+ submenuIndex,
31
+ } = state;
32
+
33
+ const newState = {
34
+ ...state,
35
+ index: insideSubmenu ? index : 1,
36
+ submenuIndex: insideSubmenu ? 1 : submenuIndex,
37
+ };
38
+
27
39
  return up.listener({
28
- state: {
29
- ...state,
30
- index: 1,
31
- },
40
+ state: newState,
32
41
  options,
33
42
  });
34
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aleman",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout-based framework for web",