Improve workspace navigation, search, and tab actions
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
import { defaultKeymap, history, historyField, historyKeymap, isolateHistory } from "@codemirror/commands";
|
||||
import { markdown, markdownLanguage } from "@codemirror/lang-markdown";
|
||||
import { searchKeymap } from "@codemirror/search";
|
||||
import { writerSearch } from "./writerSearch";
|
||||
import type { OpenBuffer } from "$lib/workspace/types";
|
||||
import { workspaceReadDataUrl, workspaceReveal } from "$lib/workspace/api";
|
||||
import { linkCandidates } from "$lib/workspace/markdownLinks";
|
||||
@@ -159,6 +160,7 @@
|
||||
history({ joinToEvent: (transaction, adjacent) => adjacent || transaction.isUserEvent("input.type.table") }), drawSelection(),
|
||||
EditorView.theme({}, { dark: true }),
|
||||
tableNavigation,
|
||||
writerSearch,
|
||||
keymap.of([{ key: "Escape", run: view => {
|
||||
if (!view.state.field(imageSource)) return false;
|
||||
view.dispatch({ effects: editImageSource.of(null) }); return true;
|
||||
@@ -335,6 +337,9 @@
|
||||
.live-writer :global(.writer-highlight) { background: #e7c56a38; color: var(--rs-text-strong); }
|
||||
.live-writer :global(.writer-math) { font-family: var(--rs-font-mono); font-style: italic; }
|
||||
.live-writer :global(.writer-comment) { color: var(--rs-text-dim); background: var(--rs-bg-active); }
|
||||
.live-writer :global(.writer-divider-line) { display: flex; align-items: center; }
|
||||
.live-writer :global(.writer-divider) { display: inline-flex; align-items: center; flex: 1; min-width: 0; height: 1.75em; cursor: text; }
|
||||
.live-writer :global(.writer-divider::after) { content: ""; width: 100%; border-top: 1px solid var(--rs-border); }
|
||||
.live-writer :global(.writer-checkbox) { display: inline-block; position: static; width: 15px; height: 15px; margin: 0 .55em 0 0; vertical-align: -.1em; accent-color: var(--rs-accent); cursor: pointer; }
|
||||
/* Keep child margins inside the measured widget; collapsed margins otherwise
|
||||
shift mouse hit-testing to the next line after a table or other preview. */
|
||||
|
||||
Reference in New Issue
Block a user