mirror of
https://github.com/narrrl/narl-workspace.git
synced 2026-11-03 16:41:27 +01:00
focus: keys go where the screen says they go
A password prompt now hands the focus back to whatever had it before it opened, or to the editor or the list when that is gone. Until now the focus was left on nothing once the field went away, so after an :unlock typed in the editor the status line still said NORMAL while j walked the list and dd asked to delete the document. A key that lands outside the editor while it is open is handed back to it for the same reason. A document or folder asked for from the board — T, :12, :e, a search — is now shown instead of being opened in a tree hidden behind the board, and closing such a document goes back to the board. A space switch that reopens a remembered document still keeps the board on screen. Unlocking the vault says so while the key is stretched.
This commit is contained in:
1 parent
e0a4c01654
commit
4bf8634991
3 files changed
+44
-2
No files matched your search
@@ -443,6 +443,15 @@
|
||||
|
||||
if (cmdline !== null || isTypingTarget(event.target)) return
|
||||
|
||||
// While writing, the status line says the editor is listening. A key that
|
||||
// lands anywhere else — the focus left behind by a prompt, a click on the
|
||||
// header — hands the focus back to it instead of walking the list unseen.
|
||||
if (workspace.editing && workspace.pane === 'document' && !event.ctrlKey && !event.metaKey && !event.altKey) {
|
||||
event.preventDefault()
|
||||
hooks.focusEditor()
|
||||
return
|
||||
}
|
||||
|
||||
// Ctrl-P: find anything, in any space — the one search that is not
|
||||
// confined to where you are.
|
||||
if (event.ctrlKey && !event.metaKey && !event.altKey && event.key === 'p') {
|
||||
|
||||
Reference in new issue
Block a user