qword 1.1.19 → 1.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ 2026.09.08, v1.1.20
2
+
3
+ fix:
4
+ - 65eb967 indent after p
5
+
1
6
  2026.09.08, v1.1.19
2
7
 
3
8
  fix:
package/client/create.js CHANGED
@@ -20,7 +20,6 @@ import {
20
20
  themeExtension,
21
21
  languageExtension,
22
22
  } from './options/options.js';
23
- import {normalizeVimPaste} from './options/vim/keep-indent-after-vim-paste.js';
24
23
  import {markField, lineField} from './decorations.js';
25
24
 
26
25
  export function createEditor(element, options = {}) {
@@ -59,7 +58,6 @@ export function createEditor(element, options = {}) {
59
58
  langCompartment.of(languageExtension(mode)),
60
59
  syntaxHighlighting(highlightStyle),
61
60
  indentOnInput(),
62
- normalizeVimPaste,
63
61
  indentUnit.of(' '),
64
62
  ...lineNumbers
65
63
  ? [
@@ -13,7 +13,6 @@ import {
13
13
  } from '@codemirror/commands';
14
14
 
15
15
  import {keepIndentAfterEnterVim} from './vim/keep-indent-after-enter-vim.js';
16
- import {normalizeVimPaste} from './vim/keep-indent-after-vim-paste.js';
17
16
 
18
17
  const enterKeepIndent = {
19
18
  key: 'Enter',
@@ -22,7 +21,7 @@ const enterKeepIndent = {
22
21
 
23
22
  export function keymapExtension(name) {
24
23
  if (name === 'vim')
25
- return [vim(), keepIndentAfterEnterVim, normalizeVimPaste];
24
+ return [vim(), keepIndentAfterEnterVim];
26
25
 
27
26
  if (name === 'emacs')
28
27
  return keymap.of([...emacsStyleKeymap, indentWithTab]);
@@ -26,22 +26,18 @@ export const keepIndentAfterEnterVim = EditorState.transactionFilter.of((tr) =>
26
26
 
27
27
  let insertedNewline = false;
28
28
  let alreadyIndented = false;
29
- let isMultilinePaste = false;
30
29
 
31
30
  tr.changes.iterChanges((_fromA, _toA, _fromB, _toB, inserted) => {
32
31
  const text = inserted.toString();
33
32
 
34
- if (text.includes('\n'))
33
+ if (text === '\n')
35
34
  insertedNewline = true;
36
35
 
37
- if (text.split('\n').length > 2)
38
- isMultilinePaste = true;
39
-
40
36
  if (text.endsWith(`\n${indent}`))
41
37
  alreadyIndented = true;
42
38
  });
43
39
 
44
- if (!insertedNewline || alreadyIndented || isMultilinePaste)
40
+ if (!insertedNewline || alreadyIndented)
45
41
  return tr;
46
42
 
47
43
  return [