Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command "workbench.action.exitZenMode" would turn on ZenMode when not in ZenMode #140392

Open
Binly42 opened this issue Jan 10, 2022 · 3 comments · May be fixed by #140545
Open

Command "workbench.action.exitZenMode" would turn on ZenMode when not in ZenMode #140392

Binly42 opened this issue Jan 10, 2022 · 3 comments · May be fixed by #140545

Comments

@Binly42
Copy link

@Binly42 Binly42 commented Jan 10, 2022

Issue Type: Bug

  1. Add a shortcut like
  {
      "key": "alt+e alt+w",
      "command": "workbench.action.exitZenMode",
  },
  1. ensure not in ZenMode
  2. fire the shortcut "alt+e alt+w"
  3. the ZenMode would be turned on

i.e. exitZenMode behaves just like toggleZenMode ...


Does this issue occur when all extensions are disabled?: Yes

VS Code version: Code 1.63.2 (899d46d, 2021-12-15T09:40:02.816Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz (8 x 1800)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 7.80GB (0.73GB free)
Process Argv --crash-reporter-id aef19635-1b79-4f09-9c0d-1ff29d49308d
Screen Reader no
VM 50%
Extensions (17)
Extension Author (truncated) Version
dendron den 0.76.0
dendron-paste-image den 1.1.0
githistory don 0.6.19
todo-tree Gru 0.0.214
vscode-wordcount-cjk hol 1.3.1
vscode-settings-cycler hoo 1.0.1
path-autocomplete ion 1.18.0
python ms- 2021.12.1559732655
wordcount ms- 0.1.0
markdown-checkbox PKi 1.7.2
vscode-yaml red 1.2.2
multi-command ryu 1.5.1
cjk-word-handler Sha 0.1.1
pdf tom 1.2.0
markdown-all-in-one yzh 3.4.0
material-theme zhu 3.13.10
writing-extension-pack-for-binly N/A 0.0.1
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythontb:30283811
pythonptprofiler:30281270
vsdfh931cf:30280410
vshan820:30294714
vstes263cf:30335440
vscoreces:30384385
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
vscop804:30404766
vscop940:30404999
vsrem710cf:30416617
py55gd98cf:30419166
vscexrecpromp3t1:30407762


usage scenario:
Since the config setting zenMode.hideTabs (after toggled) would not be effective until re-enter the ZenMode (if already in ZenMode), and I only need hideTabs==true for few scenario, the command exitZenMode would help for command macros.

workaround:
define multiple shortcuts depending on the when clause "inZenMode" and "!inZenMode", which may be very troublesome when combined with another when clauses ... (especially without paranthesis... #91473

@chenjefferson
Copy link

@chenjefferson chenjefferson commented Jan 11, 2022

Hello! Can I take a look at this issue? Thanks!

@JacksonKearl
Copy link
Contributor

@JacksonKearl JacksonKearl commented Jan 11, 2022

@chenjefferson sure! let me know if you need a pointer. Searching the codebase for 'exitZenMode' should get you started.

@chenjefferson chenjefferson linked a pull request that will close this issue Jan 12, 2022
1 task
@chenjefferson
Copy link

@chenjefferson chenjefferson commented Jan 12, 2022

Thanks! Searching for exitZenMode did the trick. Fix for the issue above, although no worries if it's in your backlog.

@Binly42 In the interim, you could use "when": "inZenMode" for keyboard shortcuts, although I understand the issue is mostly for automation and scripts.

{
      "key": "alt+e alt+w",
      "command": "workbench.action.exitZenMode",
      "when": "inZenMode",
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

5 participants