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

Pressing the Focus Mode shortcut brings up the Search Sidebar #2040

Closed
1 task done
sabretou opened this issue Apr 11, 2020 · 2 comments · Fixed by #2198
Closed
1 task done

Pressing the Focus Mode shortcut brings up the Search Sidebar #2040

sabretou opened this issue Apr 11, 2020 · 2 comments · Fixed by #2198
Labels
🐛 bug Something isn't working
Projects

Comments

@sabretou
Copy link

sabretou commented Apr 11, 2020

Description

When I press the shortcut for entering Focus Mode (Ctrl+Shift+F), Mark Text instead opens the Search sidebar. It does not enter Focus Mode. Pressing the shortcut again while the search sidebar is open has no effect.

  • Can you reproduce the issue?

Steps to reproduce

  1. Open a file, or create a new file
  2. Press Ctrl+Shift+F

Expected behavior:

Mark Text should enter Focus Mode.

Actual behavior:

The Search Sidebar opens.

Link to an example:

2020-04-11 21_24_47-Untitled-1 - Drafts

Versions

  • Mark Text: 0.16.1
  • Operating system: Windows 10 Home 64-bit
@st-den
Copy link

st-den commented May 12, 2020

I have the same problem, it really worsens my performance, because these settings are not remembered.

By the way, the Typewriter Mode shortcut (Alt + Ctrl + T) doesn't work at all, could it be related? The Source Code Mode (Alt + Ctrl + S) works fine, though.

@iJunkie22
Copy link

iJunkie22 commented May 17, 2020

I have found that remapping Toggle Focus mode to use Alt instead of Shift (and remapping Replace so it doesn't conflict) makes it work. I also found that at least on Mac, the current shortcut (the one using Shift) works, but only if you have the View menu already open. It appears someone has already unsuccessfully attempted to remedy this by wrapping the typewriter mode and focus mode callbacks in this little function

const focusEditorAndExecute = fn => {
  setTimeout(() => bus.$emit('editor-focus'), 10)
  setTimeout(() => fn(), 150)
}

The bindings live here and look like this

// --------------------------------------------------------------------------
  // View

  {
    id: 'view.source-code-mode',
    description: 'View: Toggle Source Code Mode',
    execute: async () => {
      bus.$emit('view:toggle-view-entry', 'sourceCode')
    }
  }, {
    id: 'view.typewriter-mode',
    description: 'View: Toggle Typewriter Mode',
    execute: async () => {
      focusEditorAndExecute(
        () => bus.$emit('view:toggle-view-entry', 'typewriter')
      )
    }
  }, {
    id: 'view.focus-mode',
    description: 'View: Focus Mode',
    execute: async () => {
      focusEditorAndExecute(
        () => bus.$emit('view:toggle-view-entry', 'focus')
      )
    }
  }, {
    id: 'view.toggle-sidebar',
    description: 'View: Toggle Sidebar',
    execute: async () => {
      bus.$emit('view:toggle-view-layout-entry', 'showSideBar')
    }
  }, {
    id: 'view.toggle-tabbar',
    description: 'View: Toggle Tabs',
    execute: async () => {
      bus.$emit('view:toggle-view-layout-entry', 'showTabBar')
    }
  },

@fxha fxha added the 🐛 bug Something isn't working label Jun 6, 2020
@fxha fxha added this to To Do in 0.16.2 Jun 6, 2020
@fxha fxha moved this from To Do to In Review in 0.16.2 Jun 7, 2020
@fxha fxha closed this as completed in #2198 Jun 8, 2020
@fxha fxha moved this from In Review to Done in 0.16.2 Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants