Skip to content

Commit

Permalink
Merge pull request #889 from tidalcycles/invisible-selection
Browse files Browse the repository at this point in the history
fix: invisible selection on vim + emacs mode
  • Loading branch information
felixroos authored Jan 6, 2024
2 parents 4c49b84 + bcee663 commit b52cb19
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/codemirror/codemirror.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ import { history } from '@codemirror/commands';
import { javascript } from '@codemirror/lang-javascript';
import { defaultHighlightStyle, syntaxHighlighting } from '@codemirror/language';
import { Compartment, EditorState, Prec } from '@codemirror/state';
import { EditorView, highlightActiveLineGutter, highlightActiveLine, keymap, lineNumbers } from '@codemirror/view';
import {
EditorView,
highlightActiveLineGutter,
highlightActiveLine,
keymap,
lineNumbers,
drawSelection,
} from '@codemirror/view';
import { Pattern, Drawer, repl, cleanupDraw } from '@strudel.cycles/core';
import { isAutoCompletionEnabled } from './autocomplete.mjs';
import { isTooltipEnabled } from './tooltip.mjs';
Expand Down Expand Up @@ -68,6 +75,7 @@ export function initEditor({ initialCode = '', onChange, onEvaluate, onStop, roo
syntaxHighlighting(defaultHighlightStyle),
history(),
EditorView.updateListener.of((v) => onChange(v)),
drawSelection({ cursorBlinkRate: 0 }),
Prec.highest(
keymap.of([
{
Expand Down

0 comments on commit b52cb19

Please sign in to comment.