keys: passwords, titles and names without the pointer

A keystore or encrypted key asks for its password as soon as it is
opened, asks again after a wrong one, and Enter on the file pane asks
once more after Escape — the button was the only way in before. Enter on
a sealed file opens the vault the same way.

`:name` on its own, while writing, moves up into the title, and Enter,
Escape, Down or Tab there goes back into the text; the title could not be
reached from the editor at all. `R` starts the command line from the
current name — of the row, the open document, the card or the list —
instead of an empty one.

`s` on a shared document and `y` both ask y/N before they cut readers
off: y is what a vim hand presses to yank, and it retired the live link
without a word.
This commit is contained in:
nvrl committed 2026-10-20 13:44:37 +02:00
1 parent 4bf8634991
commit 007fb1d3e3
7 files changed
+109 -27

No files matched your search

+6 -1
View File
@@ -13,11 +13,15 @@ export const hooks = {
/** `root`: into the workspace itself, where each directory is a space. */
pickArchive: (_root: boolean) => {},
focusEditor: () => {},
/** Filled in while a document is being written: into its title field. */
focusTitle: () => {},
focusList: () => {},
insertText: (_text: string) => {},
/* Filled in while a document is on screen and not being edited: the reading
pane owns the scrollback, so the list keys have somewhere to send it. */
scrollReader: (_amount: ScrollAmount): boolean => false,
/* Filled in by the file pane: what Enter does there, false when nothing. */
fileAction: (): boolean => false,
/** How many space cards the overview fits in a row, for j/k to step by. */
overviewColumns: (): number => 1,
openOverview: () => {},
@@ -582,8 +586,9 @@ export const commands: CommandSpec[] = [
aliases: ['title', 'rename'],
args: '<text>',
group: 'editing',
help: 'rename what is under the cursor — document, folder, or card on a board',
help: 'rename what is under the cursor — document, folder, or card on a board; bare, while writing, into the title',
run: async (arg) => {
if (!arg.trim() && workspace.editing && workspace.pane === 'document') return hooks.focusTitle()
if (workspace.view === 'board') {
if (!arg.trim()) return workspace.say('usage: :name <text>', 'error')
return workspace.guard(() => workspace.patchCard({ title: arg.trim() }))